The Act of Union took effect mid-way through the War of Spanish Succession, which saw the Navy operate in conjunction with the Dutch against the navies of France and Spain, in support of the efforts of Britain's Austrian Habsburg allies to seize control of Spain and its Mediterranean dependencies from the Bourbons. Amphibious operations by the Anglo-Dutch fleet brought about the capture of Sardinia, the Balearic Islands and a number of Spanish mainland ports, most importantly Barcelona. While most of these gains were turned over to the Habsburgs, Britain held on to Gibraltar and Menorca, which were retained in the peace settlement, providing the Navy with Mediterranean bases. Early in the war French naval squadrons had done considerable damage to English and Dutch commercial convoys. However, a major victory over France and Spain at Vigo Bay (1702), further successes in battle, and the scuttling of the entire French Mediterranean fleet at Toulon in 1707 virtually cleared the Navy's opponents from the seas for the latter part of the war. Naval operations also enabled the conquest of the French colonies in Nova Scotia and Newfoundland. Further conflict with Spain followed in the War of the Quadruple Alliance (1718–1720), in which the Navy helped thwart a Spanish attempt to regain Sicily and Sardinia from Austria and Savoy, defeating a Spanish fleet at Cape Passaro (1718), and in an undeclared war in the 1720s, in which Spain tried to retake Gibraltar and Menorca.