This “song of ascents” may have been sung by Israelites when going up to Jerusalem for worship.
As prominent and abiding features of the landscape, mountains were anciently regarded as representing permanence and stability. Therefore, those trusting in YHWH, relying upon him fully for help and guidance, are compared to immovable and abiding Mount Zion. Situated about 2,500 feet above sea level, Jerusalem is surrounded by higher eminences and, anciently, the steep valleys on the east, south and west situated between the city and the surrounding mountains furnished permanent natural protection. Just as Jerusalem benefited from surrounding mountains, YHWH’s protection surrounded his people. The abiding nature is expressed as being from then onward into the indefinite future (“now and into the age” [now and forever]; Septuagint).
The psalmist is confident that the “scepter of wickedness” would not rest on the land inheritance of the righteous. This could mean that any domination or oppressive rulership would only be temporary. The “scepter of wickedness” may be understood as including rulership exercised by foreign powers. According to the Septuagint, YHWH would not “allow the rod of sinners on the lot of the righteous.” He would not permit the situation to develop to a point where the upright would break under the strain of ruthless oppression and themselves use lawless means in an effort to break free from the hateful yoke.
The psalmist’s prayer is that YHWH recompense all according to their deeds. His petition is that YHWH repay good to the good, to those upright in their hearts or their deep inner selves. As for those turning aside from his way to their crooked or perverse ways, the prayer is that they be led away, evidently to be punished, with the workers of evil.
The psalmist concludes with the petition that peace be upon Israel. For faithful Israel, this would mean the enjoyment of a state of prosperity and security.
Note: Regarding the divine name (YHWH), see Psalm 1.