Spain and Tangier
Union of Spain and Portugal
The succession crisis caused by the death of the childless King Sebastian of Portugal at the Battle of Alcacer was resolved when King Philip II of Spain united the crowns of Spain and Portugal three years later in 1581. This act simultaneously gave Spain control over Portugal's overseas possessions, including Ceuta and Tangier.
Ceuta proved popular with Spanish immigrants and the enclave remained Spanish throughout Portugal's intermittently waged war of independence - the Acclamation War – fought from December 1640 to 1668.
Tangier, on the other hand, with its preponderance of Portuguese citizens was garrisoned by the Portuguese Army and remained essentially Portuguese.
Portuguese Acclamation War
The Acclamation War began as an uprising of the Portuguese aristocracy rebelling against their oppressive treatment by Philip IV of Spain (Philip III of Portugal). They complained of excessive taxes and reduced power. Additionally they saw Portugal being dragged into Spain's conflict against the Dutch. The Portuguese murdered Miguel de Vasconcelas, the Secretary of State, and imprisoned Margaret of Savoy, Philip's cousin who had been the King's representative in Lisbon, and set up John, 8th Duke of Braganza as King John IV of Portugal.
When Spanish attempts at a quick victory were doomed by the tardiness of the Count of Monterrey and the subsequent Portuguese counter-attack failed, the stage was set for a long drawn out conflict. The Spanish were deeply embroiled in wars against the Dutch Republic and France and further occupied in trying to suppress internal revolutions and hold the country and empire together, and action against Portugal was not high on its list. Portugal was still trying to defend its oversees possessions against the Dutch and was essentially content to settle into a defensive war. The conflict was largely confined to Spring and Autumn, the summers being too hot and dry, the winters too cold and wet; additionally fighting was mainly conducted by militias who were needed on the land rather than fighting.
Spanish income from South American silver had halved from its peak years and financing all its wars was a problem; Portugal derived substantial income from taxing the trade in oriental spices and Brazilian sugar and could match Spain's expenditure. Portugal also received occasional support from France (seeking to weaken Spain), and England (looking for support against possible invasion by Spain or France).
Eventually in January 1659, with a peace treaty likely to be signed with France, Spain determined to make a decisive move and sent a large force of more than 14,000 infantry and 3,500 cavalry to attack on the fortified town of Elvas. Needing to maintain its defensive forces in the north of the country against possible attack there, the Portuguese could only muster 8,000 infantry and 2,500 cavalry, but their superior tactics and, perhaps, greater motivation led to a Spanish defeat.
Given their support for Charles Stuart in exile, the Spanish might have expected preferential treatment by the restored King, and an alliance reinforced with a royal marriage. Is so they would be bitterly disappointed when Charles was persuaded to commit to the Portuguese Princess Catherine of Braganza, gaining promise of Tangier and a substantial 2 million Portuguese crowns in exchange for supporting the Portuguese with infantry regiments in their war against Spain.
Spain considered Portugal a breakaway province, and all of Portugal's overseas territories rightly belonged to Spain, including Tangier. Inclusion of that city as part of the dowry designed to enlist the fanatical English redcoats, who had destroyed the Spanish tercio at the Battle of the Dunes a few years into the Portuguese army must have seemed a dreadful insult. Unsurprisingly, therefore the Spanish ambassador to Charles II argued vehemently against his agreeing to the Portuguese proposal.
Equally vocal in the opposite direction was the French ambassador who supported Portugal's mission as a means of weakening Spain in their defence of territories adjacent to the French borders, to allow Louis XIV to consolidate a coherent and more easily defensible country.
One thing was certain, the Spanish would not willingly permit England to occupy what they considered to be the Spanish enclave of Tangier, and if they did manage to occupy it, Spain would not be complicit in allowing them to prosper there. England could expect no help from their nearest European neighbour and would have to be on its guard against Spanish plots to eject them from their newly acquired possession.
Lynch, John, The Hispanic World in Crisis and Change 1598-1700, Oxford Blackwell 1992