“These are the names
Of the tribes.
You will begin
At the northern border,
On the Hethlon road,
As far as Hazar-enon,
To the north.
This will extend
From the east side
To the westside.
This shall be
According to Joshua, chapter 19, Dan had a small territory between Ephraim, Benjamin, and Judah. However, it was wiped out, so that they ended up with a small territory between Manasseh and Naphtali near the Syrian border. Thus, the tribe of Dan here gets this northern territory, close to Damascus. It was not clear how many from the tribe of Dan were still around.
“He rejected the tent of Joseph.
He did not choose the tribe of Ephraim.
But he chose the tribe of Judah.
He loves Mount Zion.
He built his sanctuary
Like the high heavens,
Like the earth,
Which he has founded forever.
He chose his servant David.
He took him from the sheepfolds.
He brought him from tending the nursing ewes.
He made him the shepherd of his people Jacob.
He made him his inheritance of Israel.
With upright heart,
He tended them.
He guided them with skilful hand.”
This psalm ends with God choosing the sons of Judah over the sons of Joseph. He did not choose the tribe of Ephraim, but the tribe of Judah. He loved Mount Zion. Thus he built his sanctuary there just like the high heavens and the earth that he had founded. He chose his servant David when he was nursing the young sheep. He made him the shepherd of his people, Jacob not Israel. His inheritance was Israel. He tended and guided them with an upright heart and a skilful hand.