“Dievs, svētī Latviju!” was originally written while Latvia was still a part of Russia. (This was the first song ever written to include the word “Latvia” in the lyrics). The composition of the song was a direct act of defiance against the Russians, who did not encourage national sentiments. Because of the Russians forbidding the use of the word “Latvia” in the song, it was replaced with the word “Baltics”.

The song was first performed publicly in 1873 at a singing festival, and first performed as a national anthem upon Latvian independence in 1918. It was officially confirmed as the anthem in 1920.

During the time that Latvia was part of the Soviet Union, the song was again forbidden, but upon leaving the U. S. S. R. in 1990, the anthem was again restored as the national anthem of Latvia.