French forces invaded and attacked in 1807, during the Siege of Chaves, part of the Peninsular Wars. On 7 March 1808, Soult's forces invaded northern Portugal to remove British forces from Iberia. Brigadier Francisco Silveira was charged with the defense of Chaves, but his 6000 men were unable to support its defense, and quickly abandoned the castle. An attempt to defend Chaves by Francisco Pizarro was futile, and the city surrendered to French forces shortly after the engagement. With too many troops to imprison Soult released many under oath, in order to continue the attack on the main forces who had retreated to the south. But Francisco Silveira did not quit, and as the main French went on to defeat the Anglo-Portuguese alliance at the First Battle of Porto, Silveira retook Chaves.