In 1852, Costa Rica did not have a national anthem. However, when the United States and the United Kingdom accredited their diplomatic representatives in Costa Rica, the president wanted to host a welcome ceremony for the missions. A decision was made that a national anthem for Costa Rica should be composed for the occassion, and the president requested Mr. Manuel María Gutiérrez, Director of the Costa Rican National Army Orchestra, to compose the music and it was first performed for the occassion on June 11 of that year.
Several sets of lyrics were used since the melody was created, and in 1900, a contest was held to replace the existing lyrics to the anthem, which was won by José María Zeledón Brenes. Despite having the words and anthem officially composed and in common use, they were not declared as the official national anthem until 1949.