"Let me flee from before Israel, for the LORD fights for them" (Exodus 14:25). They said: He who performed miracles for them in Egypt is performing miracles for them at the sea. Rabbi Yose says: from where do you say that with the plagues by which these were struck at the sea, so were they struck in Egypt, and they could see one another, and so on? And it says, "My adversaries and my enemies" (Psalms 27:2); "And I will turn My hand against their adversaries" (Psalms 81:15); and it says, "The ten sons of Haman" (Esther 9), and so on; and it says, "To break Assyria in My land" (Isaiah 14:25); and it says, "And the envy of Ephraim shall depart" (Isaiah 11:13). Thus does this measure proceed through all the generations: "This is the counsel that is counseled upon all the earth" (Isaiah 14:26). Why? "For the LORD of hosts has purposed, and who shall annul it?" (Isaiah 14:27). So it was not in Egypt alone, but with all who oppress them through all the generations. Therefore it is said, "For the LORD fights for them" against Egypt.
The LORD Fights for Israel in Every Generation
Yalkut Shimoni on Torah 235:5
אָנוּסָה מִפְּנֵי יִשְׂרָאֵל כִּי ה' נִלְחָם לָהֶם, אָמְרוּ, מִי שֶׁעָשָׂה לָהֶם נִסִּים בְּמִצְרַיִם הוּא עוֹשֶה לָהֶם נִסִּים עַל הַיָּם. רַבִּי יוֹסֵי אוֹמֵר, מִנַּיִן אַתָּה אוֹמֵר שֶׁבַּמַכּוֹת שֶׁהָיוּ אֵלּוּ שֶׁעַל הַיָּם לוֹקִים כָּךְ הָיוּ בְּמִצְרַיִם לוֹקִין, וְהָיוּ רוֹאִין זֶה אֶת זֶה וְכוּ', וְאוֹמֵר (תהלים כז, ב) "צָרַי וְאֹיְבַי לִי", (שם פא, טו) "וְעַל צָרֵיהֶם אָשִׁיב יָדִי", וְאוֹמֵר "עֲשֶׂרֶת בְּנֵי הָמָן" וְגוֹ', וְאוֹמֵר (ישעיה יד, כה) "לִשְׁבֹּר אַשּׁוּר (בְּאַפִּי) בְּאַרְצִי", וְאוֹמֵר (שם יא, יג) "וְסָרָה קִנְאַת אֶפְרַיִם" וְגוֹ'. כָּךְ הִיא מִדָּה מְהַלֶּכֶת עַל פְּנֵי כָּל הַדּוֹרוֹת, "זֹאת הָעֵצָה הַיְעוּצָה עַל כָּל הָאָרֶץ", מִפְּנֵי מַה, "כִּי ה' צְבָאוֹת יָעָץ וּמִי יָפֵר", הָא לֹא בְּמִצְרַיִם בִּלְבַד אֶלָּא בְּכָל הַמְּצֵירִין לָהֶם עַל פְּנֵי כָּל הַדּוֹרוֹת. לְכָךְ נֶאֱמַר כִּי ה' נִלְחָם לָהֶם בְּמִצְרָיִם.