Judges 18:12
And they went up, and pitched in Kirjath-jearim, in Judah: wherefore they called that place Mahaneh-dan unto this day: behold, it is behind Kirjath-jearim. And they went up, and pitched in Kirjath-jearim, in Judah: wherefore they called that place Mahaneh-dan unto this day: behold, it is behind Kirjath-jearim.
On their journey north to take a new home the Danites pitched at Kirjath-jearim in Judah. They called that place Mahaneh-dan, meaning camp of Dan, which lay behind Kirjath-jearim.
Though placed among the closing chapters of Judges, whose main story ends with chapter 16, the verse belongs to chapters 17-21 that record events from the early part of the judges period, earlier than the preceding chapters. It is part of the record of Israel's backsliding and the disgrace and punishment that followed. It shows the tribe of Dan's first apostasy.
The Danite migration in the verse is an early fulfillment of the scattering in Israel connected with Levi. After encamping there, the Danites carried Micah's idols and priest to Laish, destroyed the city, renamed it Dan, and established idolatrous worship there that continued until the captivity of the ten tribes. That first apostasy shown in the chapter is suggested as the reason Dan was nearly lost and was omitted from the tribes numbered in the sealing of the 144,000.