The psalm opens with praise for the Temple and for those who live there (verses 1–4); praise is also expressed for the pilgrims as they come to the Temple (verses 5–7). A prayer for the king follows (verses 8–9), after which God is praised as the source of all happiness and security (verses 10–12).