On 10 November he took part in the Battle of Espinosa de los Monteros, after which he once again was taken prisoner.
Leta 1808, v času španske vojne za neodvisnost so ga ujeli Francozi in ga zaprli v El Escorial, od koder se je pobegnil.