It is probable that David penned this psalm when he had, after many a story, weathered his point at last, and gained a full possession of the kingdom to which he had been anointed. He then invites and stirs up his friends to join with him, not only in a cheerful acknowledgment of God’s goodness and a cheerful dependence upon that goodness for the future, but in a believing expectation of the promised Messiah, of whose kingdom and his exaltation to it his were typical. To him, it is certain, the prophet here bears witness, in the latter part of the psalm. Christ himself applies it to himself (Matt. 21:42), and the former part of the psalm may fairly, and without forcing, be accommodated to him and his undertaking. Some think it was first calculated for the solemnity of the bringing of the ark to the city of David, and was afterwards sung at the feast of tabernacles. In it, I. David calls upon all about him to give to God the glory of his goodness, Ps. 118:1-4. II. He encourages himself and others to trust in God, from the experience he had had of God’s power and pity in the great and kind things he had done for him, Ps. 118:5-8. III. He gives thanks for his advancement to the throne, as it was a figure of the exaltation of Christ, Ps. 118:19-23. IV. The people, the priests, and the psalmist himself, triumph in the prospect of the Redeemer’s kingdom, Ps. 118:24-29. In singing this psalm we must glorify God for his goodness, his goodness to us, and especially his goodness to us in Jesus Christ.