"on the way": at the time of your being tossed about.
"when you went out of Egypt": at the time of your redemption. What is said (of that time)? (Shemoth 15:14) "Peoples heard and they trembled," but this one (Amalek) — (Devarim, Ibid. 18) "and he did not fear G-d."
(Ibid.) "who met you upon the way": This connotes: He waylaid you.
"and he cut off from you all who straggled behind you": We are hereby taught that he killed only those who dropped off from the ways of the L-rd and dropped from under the wings of the Shechinah.