In 1704 an Anglo-Dutch force captured Gibraltar and it was then ceded to Great Britain in perpetuity under the Treaty of Utrecht in 1713.
During the 18th Century Gibraltar successfully resisted fourteen sieges, with attacks by the Moors, the King and Queen of Castile, the Spanish and the French. The most significant of these sieges was the 14th Siege between 24th June 1779 and 7th February 1783 with the French and Spanish failing to take the Rock. However, in the peace treaty that followed the British ceded Menorca (and Florida) to Spain in exchange for Gibraltar.
Gibraltar became a major Royal Naval Base during the Napoleonic Wars and formed a gateway to the Mediterranean. Many of the existing city defences were modified during the this period and Fortress Gibraltar developed into one of Britain’s most important naval ports. The arrival of cable communications saw Gibraltar develop into a hub for eastwards communication lines.