 Eventually released, in 1712, he was made seventh alcalde of the Castle of São Brás, alcalde of Amieira, in the Order of Christ, commander of São Pedro de Torrados (in the same order).He was made an artillery commander in a contingent in the Alentejo, under the command of Pedro Mascarenhas, during the War of Spanish Succession.Finding the square at Campo Maior under attack from the enemy, under the command of French general Alexandre Maître, Marquess of Bay, he petitioned the Count to be given the difficult and honourable task of defending the site.