In comparison, the loyalty and sympathies of the Portuguese of the region were tested with the French invasions of the Peninsular Wars (1808–1810). Anticipating the final defeat of the French, General Delaborde's forces were defeated on 21 August 1808, at the battles of Roliça and Vimeiro, by the Anglo-Portuguese Army that had landed at Porto Novo. Junot, who had installed himself in the town, signed a truce and left the town, retreating towards Lisbon, but not before sacking the churches and convents along the way.