This psalm is a paragon of the IndividualThanksgiving genre. At its core is the account of trouble and salvation (vv. 5,10-13,18) and the subsequent offering (which was either real or symbolic, vv. 21,27-28). Due to the fact that the individual bringing the offering was in the presence of a crowd, the psalm contains many communal aspects: summons to praise (vv. 1-4,29), didactic lesson (vv. 8-9), group blessing (v. 26), and a plural “cornerstone hymn” (vv. 22-23).

The psalm has many formal literary features: (1) it begins and ends with identical verses, (2) the hymnic response ki l’olam chasdo occurs 5 times (vv. 1-4,29), (3) it contains three sets of nearly identical verses in vv. 6-7, 8-9, 10-12, and (4) there is explicit parallelism in vv. 15, 25, 26. There is also a strong emphasis on God’s name: it appears 28 times in 29 verses.

There are many references which seem to reveal that this psalm was recited during a todah offering service (cf. Lev. 7:11-21): (1) the thanksgiving ceremony begins with a request to enter the “gates of victory” and might be followed by a gatekeeper’s response (vv. 19-20), (2) the psalm contains what Gerstenberger calls the “sacrificial formula,” i.e. what the individual would say as he handed over his animal (vv. 21,27-28), (3) there is a direct reference to the temple in v. 26, (4) there are three groups of people mentioned in vv. 2-4: “Israel,” “the house of Aaron,” and “those who fear the Lord.” Gerstenberger speculates that “Israel” refers to all Jews, even those who were dispersed, “the house of Aaron” refers to the priests and Levites in the temple, and “those who fear the Lord” refers to those present at the service. It is interesting that in all parallel occurrences “those who fear the Lord” appears last (cf. Ps. 115:9-11; 135:19-20).

There is a major dispute about who the leader of Ps. 118 is. Allen believes it was said by a king, either immediately after a victory or during a festival commemorating military victories. He points to a strikingly similar vocabulary and message of vv. 14-16 and the Song at the Sea (especially compare Ps. 118:14,16 to Ex. 15:2,6). Also, there is a mention of “nations” surrounding the speaker in v. 10. But, besides for the fact that there is no explicit mention of a king, Gerstenberger is not persuaded. Although it is not clear why, he feels the psalm was probably said by a patient (or someone else saved from distress) while sponsoring a meal for his community.