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.