them an operational base in this area. Archduke Charles landed at Lisbon in March 1704 to begin a land campaign, while the British-Dutch capture of Gibraltar was a significant blow to Bourbon prestige. An attempt to retake it was defeated in August, with a land siege being abandoned in April 1705. The 1705 Pact of Genoa between Catalan representatives and Britain opened a second front in the north-east; the loss of Barcelona and Valencia left Toulon as the only major port available to the Bourbons in the Western Mediterranean. Philip tried to retake Barcelona in May 1706 but was repulsed, while his absence allowed an Allied force from Portugal to enter Madrid and Saragossa. However, lack of popular support and logistical issues meant the Allies could not hold territory away from the coastline, and by November, Philip controlled Castile, Murcia, and parts of Valencia. Allied efforts to regain the initiative ended with defeat at Almansa in April 1707, followed by failure to take Toulon in August. The capture of Menorca in 1708, combined with possession of Gibraltar, gave the British control of the Western Mediterranean, which many considered their primary objective. War beyond Europe and related conflicts The close links between war and trade meant conflict extended beyond Europe, particularly in North America, where it is known as Queen Anne's War, and the West Indies, which produced sugar, then a hugely profitable commodity. Also, there were minor trade conflicts in South America, India, and Asia; the financial strains of war particularly affected the Dutch East India Company, as it was a huge drain on scarce naval resources. Related conflicts include Rákóczi's War of Independence in Hungary, which was funded by France and a serious concern for the Habsburgs throughout the war. In South-Eastern France, Britain funded the Huguenot 1704–1710 Camisard rebellion; one objective of the 1707 campaign in Northern Italy and Southern France was to support this revolt, one of a series that began in the 1620s. Towards peace; 1709–1715 By the end of 1708, the French had withdrawn from Northern Italy, while the Maritime Powers controlled the Spanish Netherlands, and secured the borders of the Dutch Republic; in the Mediterranean, the Maritime Powers had achieved naval supremacy, and Britain acquired permanent bases in Gibraltar and Menorca. However, as Marlborough himself pointed out, the French frontiers remained largely intact, their army showed no signs of being defeated, while Philip proved