Anglo-Spanish War (1762–63)
When war was declared between France and Great Britain in 1756, Spain remained neutral. King Ferdinand VI of Spain's prime minister Ricardo Wall effectively opposed the French party who wanted to enter the war on the side of France. Britain made an attempt to persuade Spain to join the war on their side, by offering Gibraltar in exchange for Spanish help in regaining Minorca, but this was rejected by Madrid.
Everything changed when Ferdinand VI died in 1759 and was succeeded by his younger brother Charles III of Spain. Charles was more ambitious than his melancholy brother. One of the main objects of Charles's policy was the survival of Spain as a colonial power and, therefore, as a power to be reckoned with in Europe.
By 1761 France looked like losing the war against Great Britain. Furthermore, Spain suffered from attacks by English privateers in Spanish waters, and claimed compensation.
Fearing that a British victory over France in the Seven Years' War would upset the balance of colonial power, he signed the Family Compact with France (both countries were ruled by branches of the Bourbon family) in August 1761.
This brought war with Great Britain in January 1762.
Spain agreed with France to attack Portugal which remained neutral, but which was an important economical ally of Great Britain. France hoped that this new front would draw away British forces, now directed against France. On May 9 Spain invaded Portugal, capturing Almeida, and made Great Britain send a force of 8,000 men to Portugal, but little more was achieved.
The British could now attack the Spanish colonies. A British expedition against Cuba took Havana and Western Cuba in August 1762, along with fourteen ships of the line, the bulk of Spain's Caribbean fleet. One and a half months later, the British took Manila, which meant the loss of both the capitals of the Spanish West Indies and the Spanish East Indies, a serious blow and loss in prestige for Spain.