After winning its independence in 1818 in a bloody war against Spain led by Bernardo O’Higgins, a national anthem was commissioned by the new government. Lyrics written by Argentine poet and freedom fighter Bernardo de Vera y Pintado during the war were adopted. In 1819, once the lyrics were written, a melody was sought for the anthem, during this period the words were briefly used to the melody of the Argentine anthem. On August 20, 1820 (although some sources claim it to be in September, 1819) Manuel Robles’ piece was first introduced. At first the anthem proved to be popular but by 1828 had waned in popularity. The government then requested that Ramón Carnicer compose new music for the anthem, using Bernardo de Vera’s text. This music is still being used today in the current Chilean anthem. Vera’s lyrics was still being used even after the change of melody, but was replaced in 1847 with new lyrics that weren’t so anti-Spanish. (The chorus, however, was retained to this day).