{ { Infobox military conflict
| conflict = Spanish–Portuguese War (1762–1763) | partof = the Seven Years' War | image = | caption = | date = 1762–1763 | place = Portugal, Spain, South America | casus = | territory = | result = Decisive Anglo-Portuguese victory in Europe. Stalemate in South America: Portugal defeats Spain in Mato Grosso, Rio Negro, and Rio Pardo; Spain defeats Portugal in Uruguay, and most of Rio Grande do Sul (later reconquered by the Portuguese).<ref name="Lesser">Ricardo Lesser- Las Orígenes de la Argentina, Editorial Biblos, 2003, see chapter [https://books.google.com/books?id=N74Oo3JJhFwC&q=y+de+Cevallos+El+desastre&pg=PA63 El desastre"], see pp. 63–72.</ref> Treaty of Paris | combatant1 =
| combatant2 =
| commander1 =
| commander2 =
| strength1 = Iberian Theatre:7–8,000 Portuguese7,104 British"All told the British forces in Portugal numbered roughly 7,000 men." In Speelman, Patrick and Danley, Mark – The Seven Year’s War: Global Views, 2012, p. 440. | strength2 = Iberian Theatre:30,000 Spanish12,000 French | casualties1 = Iberian Theatre:very low: (14 British soldiers killed in combat and 804 by disease or accidents; Portuguese losses low.) Unknown guerrillas | casualties2 = Iberian Theatre:25,000 Spaniards dead, missing, or captured5,000 French dead, missing, or capturedEduard Hay, British ambassador in Portugal (letter to the 2nd Earl of Egremont, 8 November 1762) reported a total of 30,000 Franco-Spanish casualties during the first two invasions of Portugal (half of them deserters, many of whom became prisoners), representing almost three-quarters of the initial invading army. See British Scholar C. R. Boxer in Descriptive List of the State Papers Portugal, 1661–1780, in the Public Record Office, London: 1724–1765, Vol II, Lisbon, Academia das Ciências de Lisboa, with the collaboration of the British Academy and the P.R.O., 1979, p. 415. See also COSTA, Fernando Dores- Nova História Militar de Portugal , Círculo de Leitores, Vol. II, Coordinator: António Hespanha, 2004, p. 358, footnote 280. | campaignbox =
}}
The Spanish–Portuguese War between 1762 and 1763 was fought as part of the Seven Years' War. Because no major battles were fought, even though there were numerous movements of troops and heavy losses among the Spanish invaders—decisively defeated in the end—the war is known in the Portuguese historiography as the Fantastic War (Portuguese and Spanish: Guerra Fantástica).
Background
When the Seven Years' War between France and Great Britain started in 1756, Spain and Portugal remained neutral, their differences in South America having been settled by the Treaty of Madrid of 1750. Ricardo Wall, prime minister to King Ferdinand VI of Spain, was opposed to the pro-French party at court who wanted to enter the war on the side of France.
All this changed when Ferdinand died in 1759 and was succeeded by his younger half-brother Charles III. The more ambitious Charles was motivated to preserve Spain's prestige as a European and colonial power. By 1761 France looked to be losing the war against Great Britain. Fearing a British victory over France, Charles signed the Family Compact with France (both countries were ruled by branches of the House of Bourbon) in August, and claimed compensation for attacks by English privateers in Spanish waters. This brought war with Great Britain in January 1762. Portugal had been weakened by the disastrous 1755 Lisbon earthquake, leading Prime Minister Sebastião José de Carvalho e Melo, Marquis of Pombal, to direct all efforts towards the reconstruction of the country and neglected the armed forces, in which he had little interest anyhow. A new treaty between Spain and Portugal, the Treaty of El Pardo of 1761, rendered the Treaty of Madrid null and void.
War
Spain agreed with France to attack Portugal, which had been neutral, but served as an important economic ally of Great Britain. France hoped that this new front would draw away British forces, now directed against France.