The first leader of Peru declared a contest to compose a new national anthem shortly after independence. The winning anthem, entitled “Marcha Nacional” (National March) was accepted immediately as the new national anthem, and was sung for the first time in the Principal Theatre of Lima on the night of 24 September 1821. In the intervening years, there were efforts to alter the lyrics (partly due to the anthem’s anti-Spanish tone) but in 1913 the lyrics were declared to be sacrosanct and not to be rewritten (previous efforts to do so didn’t catch on in popularity anyway). Despite this, the anthem continued to be revised in the ensuing decades. Different words for the first verse, then the second and third verses, were written, with varying degrees of success, during different presidential regimes but after their terms were over, the lyrics reverted back to the original ones.
In 2005, it was determined that the first verse, which was most commonly sung at the time, was not written by José de la Torre Ugarte, but it had become part of the popular ethos by this time, as well as being part of the 1913 law regarding the intangibleness of the anthem. It was also determined that the original fifth stanza had been excluded from the anthem, and was reinstated as the sixth stanza, making seven stanzas in all. In 2009, the government declared the last verse to be the official verse to be sung when the anthem is played.