Joshua 21:5

And the rest of the children of Kohath had by lot out of the families of the tribe of Ephraim, and out of the tribe of Dan, and out of the half tribe of Manasseh, ten cities.

Levi did not receive a single, continuous territory as its inheritance, but cities scattered throughout the land. Those scattered cities were its whole portion, for it had no other inheritance besides them. When the other tribes turned to idolatry, Levi's faithfulness to God won for it appointment to service at the sanctuary. By that appointment the scattering once pronounced as a curse was changed into a blessing.