וְעַל הַנִסִים: On Chanuka in the standing prayer, as well as in the grace after meals, we praise HaKodosh Boruch Hu in a special prayer of ‘Ve'al Hanissim’.
You waged their battles: The battles of the B’nei Yisroel.
Wrong done to them: Wrong done to the B’nei Yisroel in those days.
The explanation: Of this statement that HaKodosh Boruch Hu fights with, deals with and avenges the wars and quarrels of the B’nei Yisroel.
What is written: In the Torah that HaKodosh Boruch Hu said about Pinchos the son of Elazar. Bamidbor (25:11) פִּינְחָס בֶּן אֶּלְעָזָר בֶּן אַהֲרֹן הַכֹהֵן הֵשִּיב אֶּת חֲמָתִּי מֵעַל בְנֵי יִּשְ רָאֵל בְקַנְאוֹ אֶּת קִּנְאָתִּי בְתוֹכָם וְלֹא כִּלִּיתִּי אֶּת בְנֵי יִּשְ רָאֵל בְקִנְאָתִּי “Pinchos the son of Elazar the son of Aaron the kohen has turned My anger away from the B’nei Yisroel by his zealously avenging Me among them, so that I did not destroy the B’nei Yisroel because of My zeal.” RaShI says there: By his avenging My vengeance, by his releasing the wrath that I should have released.
I would have had: In other words, that Pinchos did what HaKodosh Boruch Hu was about to do.
The explanation is consistent with what is written: “When Pinchos zealously avenged My vengeance, and became enraged with the anger that I (HaShem) would have had”, and so the meaning of the words that we are saying in וְעַל הַנִסִים : “Avenged the wrong done to them” נָּקַמְתָּ אֶת נִקְמָּתָּם is - that HaShem has fought the battles that the B’nei Yisroel were supposed to wage, in other words; there is a war that the B’nei Yisroel need to wage (רִיבָּם their war) but HaShem wages this war himself.