Хасидус к Бамидбар 25:8

וַ֠יָּבֹא אַחַ֨ר אִֽישׁ־יִשְׂרָאֵ֜ל אֶל־הַקֻּבָּ֗ה וַיִּדְקֹר֙ אֶת־שְׁנֵיהֶ֔ם אֵ֚ת אִ֣ישׁ יִשְׂרָאֵ֔ל וְאֶת־הָאִשָּׁ֖ה אֶל־קֳבָתָ֑הּ וַתֵּֽעָצַר֙ הַמַּגֵּפָ֔ה מֵעַ֖ל בְּנֵ֥י יִשְׂרָאֵֽל׃

И он пошел за человеком Израилевым в комнату и протолкнул их обоих через мужчину Израиля и женщину через ее живот. Так что чума осталась от детей Израиля.

Sichot HaRan

as we have found with Pinchas, with the deed of Zimri, for, if not for Pinchas, Yisrael would, G-d forbid, have been liable to destruction. But because Pinchas went out and was zealous for the zealotry of Hashem, he silenced the judgement from off of Israel, as is written, (Numbers 25:11) "Bekan'o et kin'ati betokham velo kiliti/when he was zealous for my zeal within them, and I did not destroy," etc. Likewise this one who disputes against the Tzadik and says, "I will do to him and show him my strength and take vengeance against him," thereby he silences from him the remaining judgments, as mentioned.