Similarly, (Genesis 14:14) "And he (Abraham) pursued (them) until Dan." The tribes had not yet come to the land, and Eretz Yisrael had not yet been apportioned among the tribes. What, then, is the intent of "until Dan"? It was told to our father Abraham: In this place your children are destined to serve idolatry, and his strength (in pursuing them) waned.
When Abraham Saw This, When He Glimpsed His Own Descendants
Mekhilta Tractate Amalek 2:21