The Portuguese Restoration War () was the war between Portugal and Spain that began with the Portuguese revolution of 1640 and ended with the Treaty of Lisbon in 1668, bringing a formal end to the Iberian Union. The period from 1640 to 1668 was marked by periodic skirmishes between Portugal and Spain, as well as short episodes of more serious warfare, much of it occasioned by Spanish and Portuguese entanglements with non-Iberian powers. Spain was involved in the Thirty Years' War until 1648 and the Franco-Spanish War until 1659, while Portugal was involved in the Dutch–Portuguese War until 1663.

In the seventeenth century and afterwards, this period of sporadic conflict was simply known, in Portugal and elsewhere, as the Acclamation War. The war established the House of Braganza as Portugal's new ruling dynasty, replacing the House of Habsburg who had been united with the Portuguese crown since the 1580 succession crisis.

Portuguese Restoration War

Events leading to revolution

When Philip II of Portugal (Philip III of Spain) died, he was succeeded by his son Philip III of Portugal (Phillip IV of Spain) who followed a different approach to Portuguese concerns. Portuguese merchants saw higher taxes, the Portuguese nobility began to lose its influence at the Spanish Cortes, and Spaniards increasingly occupied the government's posts in Portugal.

Portuguese Restoration War

Ultimately, Philip III tried to make Portugal into a Spanish province, and Portuguese nobles stood to lose all of their power.

Portuguese Restoration War

Moreover, Spain entangled Portugal in the efforts to suppress the independence of the Dutch Republic during the Eighty Years' War. In response, the Dutch embarked on systematic attacks on Portuguese colonies and outposts, either pillaging or occupying them in what is known as the Dutch–Portuguese War. The Portuguese felt great resentment at what they perceived as Spain prioritizing the protection of its own colonies, while neglecting the defense of the Portuguese ones.

The situation culminated in a revolution organized by the nobility and bourgeoisie, executed on 1 December 1640, sixty years after the crowning of Philip I (Philip II of Spain), the first "dual monarch".

The plot was planned by Antão Vaz de Almada, Miguel de Almeida and João Pinto Ribeiro. They, together with several associates, known as the Forty Conspirators, killed the Secretary of State, Miguel de Vasconcelos, and imprisoned the king's cousin, Margaret of Savoy, who had been governing Portugal in his name. Philip's troops were then fighting the Thirty Years' War and also facing a revolution in Catalonia, which became known as the Reapers' War.

The support of the people became apparent almost immediately and within a matter of hours, Philip III's third cousin John, 8th Duke of Braganza, was acclaimed as King John IV of Portugal. The news spread like wildfire throughout the country. By 2 December 1640, the day after the coup, John IV, acting in his capacity as sovereign of the country, had sent a letter to the Municipal Chamber of Évora.

The ensuing conflict with Spain brought Portugal into the Thirty Years' War as at least a peripheral player. From 1641 to 1668, the period during which the two nations were at war, Spain sought to isolate Portugal militarily and diplomatically, and Portugal tried to find the resources to maintain its independence through political alliances and maintaining its colonial income.

Preparations for war

Immediately after assuming the Portuguese throne, John IV took several steps to strengthen his position. On 11 December 1640, a 'Council of War' was created to organize all of the operations. Next, the king created the 'Junta of the Frontiers' to take care of the fortresses near the border, the hypothetical defense of Lisbon, and the garrisons and sea ports.

A year later, in December 1641, he created a tenancy to assure that all of the country's fortresses would be upgraded and that the improvements would be financed with regional taxes. He also organized the army, re-established the 'Military Laws of King Sebastian', and undertook a diplomatic campaign focused on restoring good relations with England.

After gaining several small victories, John tried to make peace quickly. However, his demand that Philip recognize the new ruling dynasty in Portugal was not fulfilled until the reign of his son, Afonso VI, during the regency of Peter of Braganza, another of his sons, who later became King Peter II of Portugal). Confrontations with Spain lasted 28 years.