Two Spanish offensives which aimed to overrun Portugal had failed during the summer of 1762. Around the same time Spain received the support of France with 10,000 troops and equipment while Britain had sent reinforcements to aid the Portuguese; in total around 8,000 men led by John Burgoyne and General George Townshend. The third invasion of Portuguese territory was stimulated by the peace negotiations between France and Great Britain. Spain's position and bargaining power during the peace talks would be reinforced with a surprise attack in late autumn. However, the commander in Portugal, Count Lippe, had already reinforced the most important garrisons with British troops and officers and first line Portuguese troops. The Spanish split their army in several corps, with each one attacking a specific target. Marvão was one, which the Spanish hoped to seize and hold.
Battle
Marvão's Castelo which sat on a granitecrag of the Serra de São Mamede near the Taguson the frontier was an important dominant feature which was key to take in order to make the Spanish crossing of the Tagus easier. The castle itself was defended by 500 men under Captain Thomas Browne who was in charge of a company of Colonel Bigoe Armstrong's 83rd Regiment of foot with a small detachment of Portuguese troops, militia and a number of cannon. As the Spanish corps strength of 4000 to 5000 men approached the area, the terrorized population pressed for surrender, but the firmness of Captain Brown prevailed who was at first expecting a long siege. He was surprised when the Spanish attacked giving the nature of the fortifications high defensive position. The Spanish attempted to move up via the easy approach of the South East side of Marvão, Brown then sent reinforcements from the main citadel to that side. The British and Portuguese opened fire with musket and cannon against the Spanish assailants who tried to throw themselves up against the walls. To compound problems many of the Spanish scaling ladders were too short to mount the walls, and they were easily repelled with heavy losses; the Spanish lost many men to accidents as well as cannon and musket fire. The Spanish commander realizing surprise was lost and the castle being well defended called off the attack; he was not prepared for a siege and retreated the next day.
Aftermath
The other Spanish advance was halted at Ouguela but there the Portuguese garrison was equally prepared. The Spanish were driven before the place with considerable losses and obliged to abandon the attempt. On 19 November both garrisons retaliated, joined forces and raided and held the Spanish town of La Codosera. The resistance which the Spaniards met with in these small places had a visible effect upon their movements and convinced them that any attempt upon the Alentejo would require a decisive victory. The lateness of the season in some measure contributed to this and disease was taking a huge toll as well as the lack of supplies. On 15 November the whole of the Spanish force retreated and on 22 November Spain asked for a truce.