I was glad is a coronation anthem written in 1902 by Sir Charles Hubert Hastings Parry.

The anthem employs antiphonic choir effects and brass fanfares. It is a setting of Psalm 122:1-3,6-7, and its title comes from the opening verse of the psalm in the Authorized Version (King James Version):

I was glad when they said unto me we will go into the house of the Lord

Parry composed the anthem for the coronation of King Edward VII. Most of the content of the psalm is a prayer for the peace and prosperity of Jerusalem, and Parry was clearly analogising Jerusalem to the British Empire, as William Blake had in his poem Jerusalem (which Parry set to music later, in 1916).

I was glad is not, however, a triumphalist piece: its focal text is the line "O pray for the peace of Jerusalem", which was fitting at a time when Britain had just suffered significant losses in the Boer War, the first major conflict the country had been involved in for nearly 50 years, and one that caused loss of life on a scale that was at the time unprecedented in living memory.