"Who chanced upon you on the way" (Deuteronomy 25:18). Rabbi Yudah, Rabbi Nehemiah, and the Rabbis [each explained]. Rabbi Yudah said: "karekha" [chanced upon you] means he defiled you, as in the verse, "if there be among you a man who is not clean by reason of a nocturnal occurrence [mikreh]" (Deuteronomy 23:11). And Rabbi Nehemiah said: "karekha" means he literally encountered you. What did Amalek do? He went down to the archive house of Egypt and took the registers of the tribes, on which their names were inscribed. He came and stood outside the cloud and called out, "Reuben! Simeon! Levi and Judah! I am your brother; come out, for I wish to do business with you." And as soon as one of them came out, he would kill him. And the Rabbis said: He cooled them off before the nations of the world. Rabbi Hunia said: It is like a scalding-hot bath into which no creature could descend, and one worthless man came and leaped down into it. Even though he was scalded, he cooled it off for others. So too, from the time Israel went out of Egypt, dread of them fell upon all the nations of the world, "Then the chiefs of Edom were dismayed... terror and dread fell upon them" (Exodus 15:15-16); but once Amalek came and engaged them — even though he got what he deserved at their hands — still he cooled them off before the nations of the world.
Amalek Who Chanced Upon You on the Way
Pesikta DeRav Kahana 3:10
[י] אשר קרך בדרך (דברים כה:יח). ר' יודה ור' נחמיה ורבנין. ר' יודה א' אשר קרך, טימאך, כמה דאת או' כי יהיה בך איש אשר לא יהיה טהור מקרה לילה (דברים כג:יא). ור' נחמיה אומ' קרך וודאי. מה עשה עמלק, ירד לבית ארכיון של מצרים ונטל טימסיהם של שבטים שהיה שם שמם חקוק עליהם, ובא ועמד חוץ לענן והיה קורא ראובן שמעון לוי ויהודה אחוכון אנא, פוקו דאנא בעי מעבד פרגמטיא עימכון, וכיון שהיה אחד מהם יוצא היה הורגו. ורבנין אמרין הקירן לפני אומות העולם. א"ר חוניא לאמבטי רותחת שלא היה ברייה יכולה לירד בתוכה ובא בן בליעל אחד וקפץ וירד בתוכה אף על פי שניכווה, אלא הקירה לפני אחרים. כך מן שיצאו ישראל ממצרים נפלה אימתן על כל אומות העולם, אז נבהלו אלופי אדום וגו' תפל עליהם אימתה ופחד (שמות טו:טו-טז), וכיון שבא עמלק וניזדוג להם אף על פי שנטל את שלו מתחת ידיהם, אלא הקירן לפני אומות העולם.