When Joshua allocated the Promised Land, the tribe of Dan received a wide strip that extended west from the Tribe of Benjamin to the coastal plain at Jaffa (Joshua 19:40-46). However the "Amorites forced the people of Dan to live in the hill country. They did not allow them to live in the coastal plain" (Judges 1:34). The record continues, "the Danites failed to conquer their territory, so they went up and fought with Leshem and captured it. They put the sword to it, took possession of it, and lived in it. They renamed it Dan after their ancestor" (Joshua 19:47).
"Now the Danites took what Micah had made, as well as his priest, and came to Laish, where the people were undisturbed and unsuspecting. They struck them down with the sword and burned the city. No one came to the rescue because the city was far from Sidon and they had no dealings with anyone. The city was in a valley near Beth Rehob.
The Danites rebuilt the city and occupied it. They named it Dan after their ancestor, who was one of Israel’s sons. But the city’s name used to be Laish. The Danites worshiped the carved image. Jonathan, descendant of Gershom, son of Moses, and his descendants served as priests for the tribe of Dan until the time of the exile. They worshiped Micah’s carved image the whole time God’s authorized shrine was in Shiloh" (Judges 18:27-31).
Later on King Jeroboam fearful that the Northern Tribes would worship in Jerusalem and follow So Jeroboam made two golden calves and told his people, “It is too much for you to go up to Jerusalem; behold your gods, O Israel, that brought you up from the land of Egypt." (1 Kings 12:28). He set up one of the calves at Bethel on the way to Jerusalem. The other one he set up at Dan.