Verses 1-5: Praise and Petition. The psalm opens with a call to praise God for His enduring mercy and a personal plea to be remembered favorably among God's people, highlighting the joy found in God's chosen nation.
Verses 6-12: Confession of Sin and God's Deliverance. The psalmist confesses collective sin inherited from the fathers, recounting Israel's failure to remember God's wonders in Egypt and the Red Sea, yet acknowledging God's salvation for His name's sake.
Verses 13-33: Israel's Rebellion in the Wilderness. This section details Israel's repeated sins during the wilderness period, including lusting, envying leaders, idolatry with the golden calf, despising the promised land, and provoking God's anger, leading to various judgments.
Verses 34-43: Failure to Obey and Consequences. Israel's mingling with pagan nations, idolatry, and even child sacrifice are recounted, resulting in God's wrath, oppression by enemies, and captivity, yet God repeatedly delivers them despite their persistent sin.
Verses 44-48: God's Compassion and Final Praise. The psalm concludes with God's mercy remembered, His covenant upheld, and a prayer for salvation and restoration, ending with a doxology praising God from everlasting to everlasting.