Dead Sea MSS: 4QPsj (vv. 1-9 [1-8])
Much like the two prior Psalms, Ps 48 is a hymn on the Kingship of YHWH, with special emphasis on Jerusalem (Mt. Zion) as the King’s city. It continues the theme of YHWH as King over all the earth (and the nations), but who has a special covenant relationship with Israel, with His throne in the sanctuary of the Jerusalem Temple. This is an important component of Israelite (and Judean) royal theology. As long as Israel (and its king) remains faithful to the covenant, YHWH will continue to provide protection. The emphasis on Zion as a fortified location (on a hill) is a way of expressing this idea of God’s protection.
This Psalm consists of two stanzas (vv. 2-9 [1-8], 10-15 [9-14]), with a Selah (hl*s#) pause indicator marking the end of the first stanza. The meter is irregular, but the first stanza tends to follow a 2-beat couplet (or quatrain) format, with a brief shift to a 3+2 meter, before returning to a 2-beat quatrain in the closing verse.
The musical direction in the superscription is quite brief, somewhat oddly indicating that this musical composition (romz+m!) is also a “song” (ryv!). On the attribution to the “sons of Qorah”, cf. the introduction to the study on Psalm 42/43.
Verses 2-9 [1-8]
Verse 2 
“Great (indeed is) YHWH
and very much to be praised,
in (the) city of our Mighty (One),
(on the) mountain of His holiness.”
The second couplet emphasizes the mountain location of Jerusalem, which is somewhat misleading, since the city scarcely is located on a mountain, but rather a more modest hill. However, in Canaanite religious tradition, the Creator El (“[the] Mighty [One]”) resided on a great cosmic mountain. Any local mountain could represent this dwelling of El. The same was true in terms of Israel’s view of the dwelling of El-Yahweh. He could be seen as present upon any local mountain (such as Sinai/Horeb), or even a modest hilltop site such as Zion/Jerusalem.
Indeed, the original fortified hilltop site captured by the Israelites was the location for both the Temple and royal Palace-complex. While the name Zion (/oYx!, ‚iyyôn) could refer to the expanded city of Jerusalem, it properly signifies the smaller fortress-site (the “City of David”) where the Temple and Palace were built.
Verse 3 
“Beautiful (in its) height,
(the) joy of all (the) earth:
Mount ‚iyyôn, (on the) sides of ‚aphôn,
meeting-place of (the) great King!”
The quatrain in this verse is composed of another 2-beat (2+2) couplet followed by a 3-beat (3+3) couplet. The first couplet emphasizes both the beauty of Zion and its elevated location (indicated by the rare noun [on)—so stated in the first line. Both of these attributes are figurative, rather than meant as a realistic description of the city itself. Both its beauty and its elevation are due to the dwelling of YHWH there. Zion thus represents, from a symbolic and ritual standpoint, the cosmic dwelling of El-Yahweh, traditionally understood as a great mountain filling the heavens. As the dwelling-place of God, Zion also brings joy, i.e., is a cause for rejoicing (cocm=), for the entire earth.
The second couplet makes two points. The first point is that Zion is on the “sides” (dual of hk*r@y+) of Zaphon. The noun /opx* in Hebrew commonly means “north”, though it literally refers to something “hidden” or stored away. However, in Canaanite tradition, a local manifestation of El’s cosmic mountain-dwelling (and also that of Baal-Haddu) was Mt. Zaphon, usually identified with Mt. Casius (modern Jebel el-Aqra’). This great mountain was certainly to the ‘far north’ of Jerusalem, and a suitable location for the dwelling of the Great King (El-Yahweh). El’s mountain-dwelling (also envisioned as a great domed tent) was traditionally understood as existing in the ‘far north’, which may explain the origins of the name Zaphon (/opx*). Clearly, Mt. Zion is being identified here with the cosmic dwelling of El, according to Canaanite (and Israelite) religious tradition.
In the final line, the hy`r=q! could be translated flatly as “city” or “town”, parallel with ryu! in v. 2 . However, I have chosen to translate it here in a way that preserves what is likely the original meaning, as a “meeting place”. In this case, it is a place where the people can “meet” the Great King (YHWH), referring to the religious ritual surrounding the Temple and its sanctuary.
Verse 4 
“(The) Mightiest (is) among her forts,
being known as a place set (up) high.”
This is a rather difficult couplet, largely due to the attempt of expressing a relatively complex matrix of ideas within the confines of a short 2-beat couplet. But the basic meaning seems to be that it is the presence of YHWH, dwelling among the fortifications of the city, that gives to Zion (Jerusalem) its secure position and protection. Remember that Zion properly refers to the old Canaanite hilltop fortress-site that was captured by Israel (in the time of David). The ancient fortifications, and elevated position, gave to the city some measure of protection against invaders and hostile peoples. However, Zion was scarcely a high mountain (like Zaphon), and the characteristic here of its being a bG`c=m!, literally a “place set high up”, is something of an exaggeration. Its figurative high elevation (and thus its secure position) is due to the presence of YHWH.
Even though the Divine name (hwhy, YHWH) was used earlier in the Psalm, the occurrence of <yh!l)a$ here may be another example of substitution (for YHWH) in the ‘Elohist’ Psalms (cf. also the closing line of v. 9  below).
Verses 5-6 [4-5]
“For, see! the kings are (gather)ed as appointed,
they passed by (the city) as one;
they saw (it and) thus were astounded,
they were terrified and (fle)d in fear.”
With this verse, there is a metrical shift in the stanza, from a predominantly 2-beat (2+2) couplet format to a 3+2 meter. The idea of kings gathering together, meeting at an appointed time and place, suggests that they have come together for a hostile purpose (cf. Psalm 2:1-2). The emphasis on protection in the previous verses certainly makes a military scenario probable here. The site of the grandeur and elevated position of Zion (Jerusalem) fills the kings with astonishment (vb Hm^T*). This turns to utter fear, causing them to flee in terror (vbs lh^B* and zp^j*). Their reaction, of course, is properly due to the presence of YHWH in the city.
Verses 7-8 [6-7]
“Trembling seized hold of them (right) there,
writhing like (that of one) giving birth;
(as when) by (the) east wind (they) are shattered,
(the proud) ships of Tarshish.”
The fear and trembling (du^r^) that take hold of the kings is here described with a pair of picturesque illustrations: (1) a woman in writhing pain (ly!j) while giving birth, and (2) trading ships (filled with goods) that are torn apart at sea by a powerful east-wind.
Verse 9 
“Even that which we have heard,
so (now) we have seen (it),
in (the) city of YHWH of (the) armies,
in (the) city of our Mighty (One)!
(The) Mightiest will make her firm
until (the) distant (future)!”
As in the opening verse, so also at the close of the stanza we have a 2-beat (2+2+2+2) quatrain, though this meter is skewed slightly by the third line (which may be textually suspect [cf. Kraus, pp. 472-3]). The idea seems to be that the residents of Jerusalem (and Judah) have heard of how YHWH protected His city (and its people) in times past, but now they have witnessed this first hand. There is no way of knowing if any specific historical incident is in view, though the famous attack on the city by Sennacherib during the Assyrian invasion of Judah (701 B.C.) naturally comes to mind.
To preserve the poetic meter, I have translated the title toab*x= hwhy according to its abbreviated form, i.e., “YHWH of (the) armies”. However, the full sense of the expression must be understood according to its likely meaning as a sentence-title that retains the verbal force of hwhy, something like “(the One who) creates the (heavenly) armies”. From the ancient Israelite religious standpoint, once YHWH came to be used as the regular name for the Creator God (El), the expression is perhaps best understood as “YHWH, (commander) of (the heavenly) armies”, emphasizing His control over the heavens (forces of nature, Angelic beings, etc).
The final (3-beat) line is a declaration of praise to YHWH, confirming that He will protect His city, and continue to make it secure, far into the distant future (i.e., for all time). Almost certainly this Psalm well pre-dates the fall of Jerusalem (and the destruction of the Temple) in 587. It is interesting to consider how Israelites and Jews would explain this hymn from the standpoint of the Exile. The obvious theological explanation is that YHWH’s protection is contingent upon Israel/Judah remaining faithful to the covenant. As long as the nation, and its capital city of Jerusalem, remained faithful, God’s protection of her would last forever.
References above marked “Kraus” are to Hans-Joachim Kraus, Psalmen, 1. Teilband, Psalmen 1-59, 5th ed., Biblischer Kommentar series (Neukirchener Verlag: 1978); English translation in Psalms 1-59, A Continental Commentary (Fortress Press: 1993).