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.
Po diplomi na univerzi v Oviedu leta 1807, se je preselil v Madrid, kjer se je pridružil vojski.