"All the inhabitants of Canaan melted away" (Exodus 15:15). "Terror and dread fell upon them" (Exodus 15:16): terror upon those who were far off, and dread upon those who were near. This is the matter of which it is said, "And it came to pass when all the kings of the Amorites heard" and so forth. And so too Rahab said to Joshua's messengers (Joshua 2:10-11), "For we have heard how the LORD dried up [the waters], and when we heard it our hearts melted."
Terror and Dread Spread Over Canaan at the Sea
Yalkut Shimoni on Torah 251:15
(שמות טו טז) (נָמֹגוּ כֹּל יֹשְׁבֵי כְנָעַן). תִּפֹּל עֲלֵיהֶם אֵימָתָה וָפַחַד, אֵימָתָה עַל הָרְחוֹקִים, וָפַחַד עַל הַקְּרוֹבִים, כָּעִנְיַן שֶׁנֶּאֱמַר "וַיְהִי כִשְׁמֹעַ כָּל מַלְכֵי הָאֱמֹרִי" וְגוֹ', וְכֵן רָחָב אָמְרָה לִשְׁלוּחֵי יְהוֹשֻׁעַ (שם ב, י יא) "כִּי שָׁמַעְנוּ אֵת אֲשֶׁר הוֹבִישׁ ה' וַנִּשְׁמַע וַיִּמַּס לְבָבֵנוּ".