The Anglo-Spanish War (Spanish: Guerra Anglo-Española) was fought between Britain and Spain as part of the Seven Years' War. It lasted from January 1762 until February 1763, when the Treaty of Paris brought it to an end.
For most of the Seven Years' War, Spain remained neutral, turning down offers from the French to join the war on their side. During the war's latter stages, however, with mounting French losses to the British leaving the Spanish Empire vulnerable, King Charles III signaled his intention to enter the war on the side of France. This alliance became the third Family Compact between the two Bourbon kingdoms. After Charles had signed the agreement with France, seized British shipping, and expelled British merchants, Britain declared war on Spain. In August 1762, a British expedition captured Havana then, a month later, captured Manila. Between May and November, three major Franco-Spanish invasions of Portugal, Britain's long time Iberian ally, were defeated. In South America, the Spanish succeeded in capturing a strategically important port, but otherwise the war in South America ended in stalemate.