He was the leader of the army of Pedro IV of Portugal, former Emperor of Brazil and King of Portugal, father of Queen Maria II, in his attempt to defeat the usurper, and with him endured the siege of Oporto, 1832/1833. After the Battle of Ponte Ferreira on July 23rd, 1832, he offered to resign his command but was confirmed and created Duke of Terceira.
In July 1833, having been transported with half his army to the Algarve by Admiral Charles Napier, he was victorious at the Battle of Almada which caused the Miguelites to abandon Lisbon, and with the Duke of Saldanha was in charge of the concluding campaign against Miguel's forces, and dealt them their final defeat at the Battle of Asseiceira.