It was declared the official national anthem of Spain on 7 April 1822 when the Cortes Generales approved the corresponding decree, which was signed by King Fernando VII in Aranjuez two days later and finally published in the Madrid Gazette on 14 April. However, the liberal government was overthrown and the constitution repealed by Fernando VII in October 1823, with the "Marcha Real" resuming its role as the national anthem.