By December 1811, when it was incorporated into the Spanish Army as the Valdepeñas Hussars, his group of mounted guerrilleros numbered 300. By the end of the war, he had risen to the rank of colonel, due, in part, to the patronage of General Castaños, who had led the Spanish troops at the decisive Battle of Bailén. In 1815, he had gone on to head the Spanish 5th Army.