1762 brought two new countries into the war. Britain declared war against Spain on 4 January 1762; Spain reacted by issuing their own declaration of war against Britain on 18 January. Portugal followed by joining the war on Britain's side. Spain, aided by the French, launched an invasion of Portugal and succeeded in capturing Almeida. The arrival of British reinforcements stalled a further Spanish advance, and the Battle of Valencia de Alcántara saw British-Portuguese forces overrun a major Spanish supply base. The invaders were stopped on the heights in front of Abrantes (called the pass to Lisbon) where the Anglo-Portuguese were entrenched. Eventually the Anglo-Portuguese army, aided by guerrillas and practicing a scorched earth strategy, chased the greatly reduced Franco-Spanish army back to Spain, recovering almost all the lost towns, among them the Spanish headquarters in Castelo Branco full of wounded and sick that had been left behind.