Royal Navy

HM Naval Base Gibraltar: Three Centuries of Guarding the Gateway

16 August 2026 · 9 min read
HM Naval Base Gibraltar Dockyard From the Rock 2021
HM Naval Base Gibraltar Dockyard From the Rock 2021

A Rock Taken in Four Days

Gibraltar fell to an Anglo-Dutch fleet under Admiral Sir George Rooke between 21 and 24 July 1704, when a landing force of some 1,900 English and 400 Dutch marines under Prince George of Hesse-Darmstadt overwhelmed a Spanish garrison of barely 500 men.

Rooke left behind a garrison of 2,000 marines with 42 cannon and six months of provisions, and that garrison went on to survive a nine-month Franco-Spanish siege before Gibraltar was formally ceded to Britain in perpetuity under the Treaty of Utrecht in 1713.

English naval use of the harbour actually predates full sovereignty by a couple of decades, with an early forge and storehouse built around 1680 under Admiral Arthur Herbert, when Gibraltar was already being weighed up against Tangier as a superior base thanks to its natural harbour and careening facilities.

Through the eighteenth century the dockyard grew piece by piece, with quays, storehouses, the Old and New Moles, and the substantial Rosia water tanks, built between 1799 and 1804 using pioneering cement engineering, to keep the fleet supplied with fresh water in a place that famously has very little of its own.

The Great Siege and Red-Hot Shot

Gibraltar's harbour proved absolutely essential during the Great Siege of 1779 to 1783, part of the American War of Independence, when the garrison survived only because relief convoys under Admirals Rodney, Darby and Howe repeatedly fought their way through to resupply it, Rodney's January 1780 relief coming hot on the heels of his victory over a Spanish squadron at the so-called Moonlight Battle.

Between these formal reliefs, blockade-runners organised through the British consul in Tangier kept a trickle of supplies flowing.

The dockyard itself contributed directly to the siege's most dramatic moment, the Battle of the Floating Batteries on 13 September 1782, when ten heavily armoured Spanish battering ships carrying 142 guns between them were destroyed using red-hot shot, cannonballs heated in furnaces before firing, an innovation pioneered at Gibraltar that set the Spanish vessels ablaze from within their own hulls.

An Edwardian Engineering Triumph

By the 1890s Gibraltar's aging facilities could no longer cope with the scale of modern battleships, and a major programme of dockyard expansion followed, formally established from 1894 and largely completed between 1902 and 1906, adding new moles, breakwaters and three substantial dry docks capable of servicing the largest dreadnoughts in the fleet.

The precise sequence and naming of the three docks varies slightly between otherwise reputable sources, with even Gibraltar's own museum record appearing to contain a numbering inconsistency, so readers should treat exact dock-by-dock dating as broadly but not perfectly settled.

What is not in dispute is the scale of ambition involved, transforming Gibraltar into a first-class battle fleet repair base securing the western approach to Suez and the vital sea lane linking Britain to India and the wider empire, an investment that paid for itself many times over in the conflicts that followed.

Two World Wars and a Trojan Horse

During the First World War, Gibraltar became, in the words of one archival account, the gateway for more traffic than any other position in the world, a critical repair and convoy-assembly point especially after German submarines began operating in the Mediterranean from 1915, with American naval forces basing there from 1917 to help escort a substantial share of Mediterranean convoys.

The Second World War saw Gibraltar's importance rise still further.

Force H was formed there in June 1940 under Vice-Admiral Sir James Somerville, covering both the western Mediterranean and eastern Atlantic, and the dockyard served as the assembly and refuelling hub for the extensive Gibraltar convoy system supplying both the Rock itself and besieged Malta.

For Operation Torch in November 1942, General Eisenhower established Allied Force Headquarters deep inside tunnels carved into the Rock, reportedly the first non-British officer to command at Gibraltar in well over two hundred years.

Rather more covertly, the Italian tanker Olterra, deliberately scuttled at nearby Algeciras, was secretly refitted from 1942 with a hatch cut below the waterline, turning her into a hidden base from which Italian frogmen launched human-torpedo attacks against Allied shipping anchored off Gibraltar, sinking or damaging six merchant vessels across raids in December 1942 and throughout 1943 before the operation was uncovered, a notably audacious piece of underwater sabotage carried out right under the base's nose.

The Rock Is Hollow

A very large part of wartime Gibraltar was not on the Rock at all but inside it. Military tunnelling, begun during the Great Siege and taken up again in earnest from 1939, eventually produced thirty-four miles of tunnel, which is close to twice the length of Gibraltar's entire road network. The work was not finally completed until 1967.

What went inside was not storage. There were barracks, hospitals, workshops, a power station, water reservoirs, telephone exchanges and a road called the Great North Road running through the middle of the Rock. Allied Force Headquarters was one room in an underground city built to keep a garrison of sixteen thousand alive and working if the surface became untenable, which puts Eisenhower's famous tunnel office in rather better perspective.

The Six Men Who Were to Be Sealed Inside the Rock

The strangest thing about wartime Gibraltar never actually happened. If the Rock fell, the plan known as Operation Tracer was to leave six men behind inside it, sealed in, to watch the harbour and report by radio on everything that moved through the Strait.

The chamber built for them was forty-five feet by sixteen by eight, with two narrow slits cut through the rock, one looking west over the Bay of Gibraltar and the other east over the Mediterranean, serving as observation ports and as the only ventilation. There were provisions for up to seven years. There was no way out: the entrance was to be bricked up behind them, and the volunteers had accepted that they would be in there until either the war ended or they did.

The detail that stops people short is the arrangement for the dead. Any man who died was to be embalmed and cemented into the floor, because there was nowhere else in a sealed chamber to put a body, and the survivors would go on living on top of him.

Gibraltar did not fall, the chamber was never occupied, and the secret held so thoroughly that the place was simply lost. In late 1997 a group of cavers working the southern end of the Rock felt a draught coming out of a tunnel, broke through a brick wall, and found the observation posts still there with the slits still open to the sea. One of the men who had volunteered for it was still alive, and confirmed what they had walked into.

A Crash That Still Raises Questions

One event connected to wartime Gibraltar deserves particularly careful and honest treatment. On 4 July 1943, a B-24 Liberator carrying General Wladyslaw Sikorski, the Polish prime minister and commander-in-chief, crashed into the sea barely sixteen seconds after taking off from Gibraltar, killing sixteen people, with only the Czech pilot surviving.

A British Court of Inquiry found the elevator controls had jammed but could not determine why, and explicitly ruled out sabotage, though the Polish government-in-exile rejected the findings as inconclusive, and conspiracy theories have persisted ever since, fuelled by a Polish forensic exhumation and re-investigation conducted between 2008 and 2013 that ultimately failed to settle the matter either way.

It is worth being clear that this disputed tragedy is a separate matter from a sometimes-repeated but unverifiable claim of an assassination attempt on General Eisenhower at Gibraltar, a story that could not be traced to any credible source and appears to be a conflation with entirely unrelated wartime plots, and should not be treated as established fact.

Sixteen Years With the Gate Shut

Between the Second World War and privatisation there is a chapter that matters enormously to how the base actually operated. In 1967 Gibraltar held a referendum on whether to remain British, and voted to do so by something in the order of twelve thousand votes to forty-four, which is about as unambiguous as a ballot gets.

Franco's answer came in June 1969, and it was to shut the land frontier altogether. It stayed shut for sixteen years. The Spanish workforce that had crossed every morning for generations simply stopped arriving, relatives found themselves on the wrong side of a locked gate, and even the telephone lines went dead. Everything and everybody now had to come in by sea or by air, which turned the harbour from a convenience into the only thing keeping the Rock supplied. The Royal Navy underlined the point by sending warships to sit in it, HMS Blake among them, and nobody aboard was under the impression it was a courtesy call.

From Royal Dockyard to Commercial Yard, Still Flying the Flag

Falling postwar demand for a large Royal Navy repair yard led to privatisation of the dockyard from 1983, becoming the Gibraltar Ship Repair Company, passing through Cammell Laird ownership from 1997 before being relaunched as the commercial ship repair firm Gibdock in 2011 and acquired by new owners in 2022.

Despite this commercialisation, HM Naval Base Gibraltar itself remains an active Royal Navy installation today, home to the small Gibraltar Squadron of patrol boats that escort visiting warships and submarines through the Strait, with five warship berths, two rated for nuclear-powered submarines, making it a recognised NATO staging point over three centuries after Rooke's marines first scrambled ashore in 1704.

The seagoing presence today is small but, for the first time in the Rock's history, permanent. HMS Trent (P224), of the River class, is forward deployed to Gibraltar, working the Mediterranean and West Africa from a harbour that has been doing much the same job since 1704: sitting at the one point every ship passing between the Atlantic and the Mediterranean has to squeeze through. The dockyard is commercial, the garrison is a fraction of what it was, and the tunnels are mostly dark. The geography has not moved an inch.

The Fence Comes Down

On 14 July 2026 Britain signed the treaty with the European Union that settled Gibraltar's place after Brexit, and from midnight the following day workers began taking down the frontier fence that had stood for 118 years. For the naval base, the clauses that mattered most were the ones that changed nothing: British military facilities on the Rock remained under full UK control, and Spain was given no power to restrict the movement of British service personnel or military goods into them.

This is a live article which will be updated when more information is available.

Follow @Hantsprints on X for more Royal Navy history and warship, submarine and shore establishment photography.
Follow on X

The print featured in this article

Every print is made to order in the UK, with free UK delivery.

HM Naval Base Gibraltar Dockyard From the Rock 2021
HM Naval Base Gibraltar Dockyard From the Rock 2021 Photo Print from £4.00 See sizes and prices

Leave a comment

Please note, comments must be approved before they are published

This site is protected by hCaptcha and the hCaptcha Privacy Policy and Terms of Service apply.

Written by
Lee Edwards

Lee writes the ship histories and fleet features for Hampshire Prints. He served in the Royal Navy, and some of the modern fleet photographs on this site are his own, taken from the Portsmouth shoreline.

More about Lee