The psalm opens with a call: give thanks to the Lord, for he is good, for his steadfast love endures forever. Let Israel say it, the house of Aaron and those who fear the Lord. Then the speaker tells his experience: in distress he called on the Lord, and the Lord answered him and set him free. The Lord is on his side, he will not fear what man can do to him. It is better to take refuge in the Lord than to trust in man or in princes.
The nations surrounded him like bees, but in the name of the Lord he cut them off. He was pushed hard that he might fall, but the Lord helped him. The Lord is his strength and his song, and has become his salvation. There are glad cries of victory in the tents of the righteous. I shall not die, but I shall live, and recount the deeds of the Lord; the Lord has disciplined me severely, but he has not given me over to death.
Then he asks that the gates of righteousness be opened, and enters to give thanks. He says the stone that the builders rejected has become the cornerstone; this is the Lord's doing, it is marvelous in our eyes. This is the day that the Lord has made; let us rejoice and be glad in it. He begs for salvation, blesses the one who comes in the name of the Lord and asks to bind the festal sacrifice with cords to the horns of the altar. The psalm ends as it began, giving thanks to the Lord, for he is good and his steadfast love endures forever.