1704 during the War of the Spanish Succession; possession was assigned to Britain in the 1713 peace Treaty of Utrecht that ended the war. The Spanish made an unsuccessful attempt to recapture Gibraltar in 1727 during the Anglo-Spanish War (1727–1729). After the war ended with the Treaty of Seville (1729), in 1730 Spain built a line of fortifications across the north of the peninsula, cutting Gibraltar off from the mainland. In 1738 a dispute between Spain and Great Britain arose over commerce between Europe and the Americas. This led to the outbreak of the War of Jenkins' Ear on 23 October 1739. Both sides planned to establish trenches near Gibraltar. Seeing these first movements, Britain ordered Admiral Vernon to sail from Portobello and strengthen the squadron of Admiral Haddock who was already stationed in the Bay of Gibraltar. However, no substantial fighting occurred at Gibraltar before peace returned in 1748. King Philip V of Spain had died on 9 July 1746 and his successor, Ferdinand VI, began negotiations with Britain on trade. The British Parliament was amenable: they considered lifting the British embargo on Spain and possibly ceding Gibraltar in return for a trade agreement. However, none was reached before Ferdinand VI died in 1759. The new king, Charles III, was less willing to negotiate with Britain. Instead, he signed a Family Compact alliance with Louis XV of France on 15 August 1761. France was already at war with Britain in the Seven Years' War (1756–63), so Britain responded by declaring war on Spain. In the following two years, the British captured Manila and Havana, the capitals of the Spanish colonies of the Philippines and Cuba, respectively. Again there was no fighting at Gibraltar. The peace Treaty of Paris (1763) that ended the war returned Manila and Havana to Spain, in exchange for Spanish holdings in Florida. The treaty also transferred most of France's colonies in North America to Britain. In the years of peace that followed both France and Spain sought an opportunity to fight Britain on more favourable terms, with the goal of recovering their lost colonial possessions. The outbreak of the American War of Independence in 1775 provided that opportunity. Both France and Spain began by supplying funding and arms to the American revolutionaries, and drew up a strategy to intervene on the American side against Britain. France entered the war as allies of the new United