and the Dutch West India Company, repeatedly attacking Portugal's colonial possessions in the Americas, in Africa, in India, and in the Far East. Portugal was in a defensive posture throughout, and it received very little military help from Spain. After the acclamation of John, the pattern persisted all over the Portuguese Empire until the final expulsion of the Dutch from Angola (1648), São Tomé (1649), and Brazil (1654). The Dutch signed a European truce with Portugal, helping each other somewhat against their common enemy, Spain. The Dutch resumed buying salt in the Setúbal salt factories, restarting commerce between the two countries for the first time since 1580, when the Spanish branch of the Habsburgs, against whom the Dutch were in revolt, had assumed the Portuguese throne. However, Dutch attacks on Portuguese territories persisted until 1663, even after the signing of the Treaty of The Hague in 1661. Relations between Portugal and England England was then embroiled in its own civil war. Portuguese problems in dealing with England arose from the fact that the English Parliament fought and won its anti-royalist war while, at the same time, Portugal's royal court continued to receive and recognize English princes and nobles. The strained relations persisted during the short-lived Commonwealth period, when the republican government that had deposed Charles I ruled England and then Ireland and Scotland. After the restoration of the Stuart dynasty, it became possible for Portugal to compensate for the lack of French support by renewing its alliance with England. That took the form of a dynastic marriage between Charles II and Afonso VI's sister, Catherine of Braganza, which assured Portugal of outside support in its conflict with Spain. The English alliance helped peace with Spain, which had been drained by the Thirty Years' War and had no stomach for further warfare with other European powers, especially a resurgent England. War Militarily, the Portuguese Restoration War consisted mainly of border skirmishes and cavalry raids to sack border towns, combined with occasional invasions and counter-invasions, many of them half-hearted and under-financed. There were only five major set-piece battles during twenty-eight years of hostilities. The war may be considered to have had three periods: first, an early stage (1640–1646) when a few major engagements demonstrated that the Portuguese could not be easily returned to submission to the Spanish Habsburgs, second, a long period (1646–1660) of military standoffs, characterized by small-scale raiding, while Spain