“A Psalm of David. The earth is the Lord’s and the fullness thereof, the world and those who dwell therein, for he has founded it upon the seas and established it upon the rivers. Who shall ascend the hill of the Lord? And who shall stand in his holy place? He who has clean hands and a pure heart, who does not lift up his soul to what is false and does not swear deceitfully. He will receive blessing from the Lord and righteousness from the God of his salvation. Such is the generation of those who seek him, who seek the face of the God of Jacob. Selah Lift up your heads, O gates! And be lifted up, O ancient doors, that the King of glory may come in. Who is this King of glory? The Lord, strong and mighty, the Lord, mighty in battle! Lift up your heads, O gates! And lift them up, O ancient doors, that the King of glory may come in. Who is this King of glory? The Lord of hosts, he is the King of glory! Selah” -Psalm 24
Though it is not certain, it is possible this psalm was written for the occasion when David escorted the ark ‘with song and lyres and harps …’ from Kirjath-jearim to mount Zion (2 Sam. 6;1 Chr. 13:8).
The gist of the psalm is that although God is the Creator and Governor of all mankind, the children of Abraham have received special favor—not due to any merit of their own—since God has chosen them to be his peculiar people and has erected the sanctuary wherein he dwells among them. Further, David emphasizes that it is not enough to simply be among the children of Abraham but God was near unto those “who feared and served him in sincerity, and who had cleansed themselves from the pollutions of the world, in order to devote themselves to holiness and righteousness.”