He studied Latin and Philosophy in Mondoñedo (Lugo). When the Independence War broke out, he was studying at Santiago de Compostela University and formed part of the Literary Battalion. When the Napoleonic troops were expelled, he continued his military career and left from Cádiz to Peru on 17th April 1817, where he soon got the rank of brigadier. In 1823, he was promoted to general brigadier and took charge of the Spanish army against Bolívar. In December 1824, he was injured at Ayacucho Battle and besieged for fifteen months at Callao Fort until he signed capitulation in 1826, and could return to Spain. In 1836, he was minister of War during the government of Mendizábal and Calatrava, president of the cabinet (from May 1842 to March 1843 and deputy in Lugo (1841-1842).