This same Biblical passage notes that “the territory of the Danites slipped from their grasp.” So the Danites migrated to the north, captured Leshem (called Laish in Judges 18:7ff), and renamed it Dan (Joshua 19:47).