In 1808, during the Spanish War of Independence he was taken captive by the French and imprisoned in El Escorial, from where he eventually escaped. On 10 November he took part in the Battle of Espinosa de los Monteros, after which he once again was taken prisoner. Three days later he was sent to France, and after he changed his name to "Riego", was eventually released. He traveled around England and the German states, and in 1814 he returned to Spain right before the Spanish Constitution of 1812 was abolished by Fernando VII. In Spain, Riego once again joined the army with a rank of lieutenant colonel and took an oath to the Constitution. During the six years of absolutism that followed the restoration of King Fernando VII, Spanish liberals wished to restore the Spanish Constitution, which the King had abolished in May 1814. Riego joined the freemasons and collaborated with liberals in several conspiracies against the King, which failed.
1820 revolt
In 1819, the King was forming an army of ten battalions to fight in the Spanish American wars of independence. Riego was given command of the Asturian Battalion. After arriving in Cádiz, together with other liberal officers, he started a mutiny on 1 January 1820, demanding the return of the 1812 Constitution. Riego's troops marched through the cities of Andalusia with the hope of starting an anti-absolutist uprising, but the local population was mostly indifferent. An uprising, however, took place in Galicia, and it quickly spread throughout Spain. On 7 March 1820, the royal palace in Madrid was surrounded by soldiers under the command of General Francisco Ballesteros, and on 10 March, the King agreed to restore the Constitution.
Later life
The new progressive government promoted Riego to field marshal and made him Captain General of Galicia. On 8 January 1821 he took command of Aragon, and moved to Zaragoza. On 18 June, he married his cousin Maria Teresa del Riego y Bustillos. On 4 September 1821, because of a failed republican revolt, he was wrongly accused of republicanism and imprisoned. However, his popularity grew, and demonstrations took place in Madrid demanding his release. In March 1822, he was elected to the Cortes Generales and eventually released from prison. In December 1822, at the Congress of Verona, the Quintuple Alliance countries decided that a Spain that was bordering on republicanism was a threat to the balance of Europe, and France was chosen to force a restoring of the absolute monarchy in Spain. On 7 April 1823, the French army crossed the borders. Riego took command of the Third Army and resisted the invaders as well as local absolutist groups. On 15 September he was betrayed and taken prisoner in a country estate near the village of Arquillos, Jaén. He was taken to Madrid. Despite asking for clemency from the King, Riego was found guilty of treason, as he was one of the members of parliament who voted in favor of taking the power from the King. On 7 November 1823, he was hanged at La Cebada Square in Madrid.
Memory
El Himno de Riego, a song written in honour of Riego, became the anthem of the Second Spanish Republic. Currently his portrait is displayed in the building of the Cortes Generales.