"And it came to pass, as Samuel was offering up the burnt-offering, etc., that the LORD thundered, etc., and discomfited them" (1 Samuel 7:10). Rabbi Abba bar Kahana said: The Holy One, blessed be He, promised that He would wage three wars of panic for Israel, and all three of them He waged for them. The first was in the days of Joshua: "and the LORD discomfited them before Israel, etc." (Joshua 10:10). The second was in the days of Sisera: "and the LORD discomfited Sisera, etc." (Judges 4:15). And the third was in the days of Samuel: "And it came to pass, as Samuel was offering up, etc., that the LORD thundered with a great voice." Rabbi Simon adds two: "and discomfited the camp of Egypt" (Exodus 14:24), and "and it shall come to pass in that day, that a great panic from the LORD shall be among them" (Zechariah 14:13). And they do not disagree: what Rabbi Simon said refers to the past, and what Rabbi Abba bar Kahana said refers to that which is yet to come upon them.
Three Wars of Divine Panic from Joshua to Samuel
Midrash Shmuel 13:3
ויהי שמואל מעלה העולה וגו' וירעם ה' וגו' ויהמם (שמואל א' ז' י'), אמר רבי אבא בר כהנא שלש מלחמות של מהומה הבטיח הקב"ה שהוא עושה לישראל, ושלשתן עשה להם, הראשונה בימי יהושע ויהמם ה' לפני ישראל וגו' (יהושע י' י'), השניה בימי סיסרא ויהם ה' את סיסרא וגו' (שופטים ד' ט"ו), והשלישית בימי שמואל, ויהי שמואל מעלה וגו' וירעם ה' בקול גדול, רבי סימון מוסיף תרתי ויהם את מחנה מצרים (שמות י"ד כ"ד), והיה ביום ההוא תהיה מהומת ה' רבה בהם (זכריה י"ד י"ג), ולא פליגין מה דאמר רבי סימון לשעבר, מה דאמר רבי אבא בר כהנא לכשתבוא בהם.