Distress the Midianites, and you shall smite them.
צָרוֹר אֶת הַמִּדְיָנִים וְהִכִּיתֶם אוֹתָם
Bamidbar 25:17
The Slonimer Rebbe in The Netivot Shalom raises a question from The Or HaChaim HaKadosh.
Why does this parshah put this injunction here to 'distress the Midianites', since the actual war against the Midianites takes place in next week's parshah Mattot?
"Take revenge for the children of Israel against the Midianites; afterwards you will be gathered to your people."
נְקֹם נִקְמַת בְּנֵי יִשְׂרָאֵל מֵאֵת הַמִּדְיָנִים אַחַר תֵּאָסֵף אֶל עַמֶּיךָ
Bamidbar 31:2 (Parsha Mattot)