The fourth of the final Hallelujah Hymns in Psalms, this one draws the image of a distinct historical event, though we cannot pin it down which one. We do know that during the Period of Restoration after Exile, the returnees faced persecution and military conflict. We also know they won several battles, and this psalm was composed to celebrate such a victory.
After the initial hallelujah, the psalmist proclaims that here is something worthy of a new song to mark the celebration for future generations. It shall be an unrestrained and uninhibited outburst of praise and worship to the God of Israel, employing every imaginable means of giving Him glory. This is Jehovah, who clearly dotes on His own family when they humble themselves before Him.
The psalmist goes on and on about the extravagances of jubilation due the Lord for for His favor. It’s as if everyone in the nation has in their hands the finest weapon of divine authority. Clearly, by their adherence to the Covenant alone were they granted such a resounding victory over their oppressors. This is not so much about revenge, but justice according to the promises of God. The author here equates the revelation of God with the power and authority to correct wrongs on the earth, symbolized by the sword.
In the Ancient Near East, it is the royalty and nobility of enemy people who are most to blame for unjust aggression, so they bear the shame when they fail. They are painted as arrogant in contrast to the humility of penitent Israel who cries out to Jehovah for relief. When He delivers, it is because of His Word alone.