Battle of Brihuega

The Battle of Brihuega took place on 8 December 1710 in the War of the Spanish Succession, during the allied retreat from Madrid to Barcelona. The British rearguard under Lord Stanhope was cut off within the town of Brihuega and overwhelmed by a Franco-Spanish army under the duc de Vendôme. Brihuega with other events brought an end to the British participation in the war.
Prelude.
In 1710, victories at the Battle of Almenara (July 27) and the Battle of Saragossa (August 20) allowed the Grand Alliance army supporting Archduke Charles to occupy Madrid for the second time. On 21 September the Archduke—Charles III of Spain, according to the Allies—entered his prospective capital. But the invasion of 1710 proved to be a repetition of the invasion of 1706: The Alliance's 23,000 men, reduced by a loss of 2,000 in the actions at Almenara and Saragossa, by constant skirmishes with the "guerrilleros", and by disease, were unequal to the task of holding their conquests and occupying the two Castiles. The Portuguese were unable to offer help.
The Bourbon army was rapidly refitted and reorganized by French general the duc de Vendôme, who was lent to Philip V's service by the latter's grandfather, the Sun King. Spanish volunteers and regular units were joined by the Irish brigade and by French troops secretly directed to enter Spanish service.
Madrid emptied, deserted by all except the poorest of its inhabitants, and the Grand Alliance's position became untenable. On 9 November the Alliance evacuated the city and embarked on a retreat to Catalonia. Leaving behind the main body of the army, the Archduke advanced with a guard of 2,000 cavalry, hurrying back to Barcelona. The rest of the army marched in two detachments, the division being imposed on them by difficulty of foraging. General Guido Starhemberg marched ahead with the main body of 12,000 men, a day's march ahead of the British troops, 5,000 men under Lord Stanhope. This division of forces invited disaster in the presence of the duc de Vendôme, a capable and resourceful leader.
The battle.
Vendôme set out from Talavera with his troops, and pursued the retreating British army with a speed perhaps never equalled in such a season and in such a country. The middle aged Frenchman led his Franco-Spanish army day and night. In typical Vendôme style, he swam, at the head of his cavalry, the flooded Henares and in a few days overtook Stanhope, who was at Brihuega with the left wing of the Grand Alliance army.
"Nobody with me," said the British general, "imagined that they had any foot within some days' march of us and our misfortune is owing to the incredible diligence which their army made." Stanhope had barely enough time to send off a messenger to the centre of the army, which was some leagues from Brihuega, before Vendôme was upon him on the evening of 8 December. The next morning the town was invested on every side. 
Blasting the walls of Brihuega with heavy cannon, a mine was sprung under one of the gates. The British kept up a terrible fire till their powder was spent. They then fought desperately against overwhelming odds as Vendôme's men stormed the city with bayonets fixed and began to take the town by bloody close quarters fighting, street by street. The British set fire to the buildings which their assailants had taken but in vain. The British general saw that further resistance would produce only a useless carnage. He concluded a capitulation and his army became prisoners of war on honourable terms.
Aftermath.
Scarcely had Vendôme signed the capitulation, when he learned that Staremberg was marching to the relief of Stanhope. On December 10 the two met in the bloody battle of Villaviciosa, after which Starhemberg continued the allied retreat.
The British troops did not remain in captivity for long before they were exchanged and sent home in October 1711.
The defeat helped justify the Harley Government's plan to agree a compromise peace with France at the Treaty of Utrecht. Opponents of the deal protested on the grounds of "No Peace Without Spain". Nonetheless Allied forces were withdrawn, with the final action taking place at the Siege of Barcelona in 1714.