 His death sentence was commuted in exchange for serving in the Spanish Army, which he did for five years.Later, he escaped and rejoined the revolutionary army of General Antonio José de Sucre with the rank of captain.He joined the armies of the southern campaigns in Nueva Granada and Perú.