Gibraltar's history: a town ceded without its land connection
2 858 words · 13 min · updated 2026-09-26
Spain yielded the town, castle and port of Gibraltar to Britain in 1713 without any open communication by land with the country round about, and most of what has happened on the peninsula since is an argument about that clause. The people it applied to were mostly new: about 4,000 inhabitants had marched out behind the Spanish garrison in August 1704 and resettled at the head of the bay, where their camp became San Roque. Spain fortified a line across the isthmus in 1730 and shut the frontier completely from 1969 to 1985. A treaty between the United Kingdom and the European Union, applied provisionally from 15 July 2026, is written to take the barriers on that land border away.
In short
- Name
- From Jebel Tariq, after the landing of 711
- Retaken by Castile
- August 1462
- Captured
- 4 August 1704, in the name of Charles III of Spain
- Ceded
- Article X, Treaty of Utrecht, 13 July 1713
- Great Siege
- 24 June 1779 to February 1783
- Crown colony
- 1830
- Frontier closed
- 1969 to February 1985
- Constitution in force
- Gibraltar Constitution Order 2006
Who used the Rock before anyone fortified it
The limestone ridge was occupied long before it was a fortress. A Neanderthal skull was dug out of Forbes' Quarry on the north face in 1848, the first adult Neanderthal skull known to science. UNESCO describes four caves in the eastern cliffs, Gorham's among them, whose deposits record Neanderthal occupation over more than 100,000 years, with evidence of birds and marine animals hunted for food, feathers used as ornament and abstract engravings cut into the rock. Excavations in Gorham's Cave have dated Neanderthal occupation to as recently as 28,000 to 24,000 years ago.
Recorded history starts around 950 BC. The Phoenicians appear to have used Gorham's Cave as a shrine, and pottery, jewellery and Egyptian scarabs left there look like offerings for a safe passage through the strait. Greeks and Romans counted the Rock as one of the two Pillars of Hercules, and the Romans called it Mons Calpe.
Nobody built a town on it. The peninsula had no easily reached fresh water, no fertile soil and no safe anchorage on its shore, and the ancient settlement of the bay was Carteia, founded by the Phoenicians near the site of modern San Roque and taken by Rome in 206 BC. That choice, a town on the mainland and an empty rock across the water, is the arrangement 1704 would reverse.
How Tariq's mountain became a Castilian key
A mostly Berber army under Tariq ibn Ziyad crossed from North Africa in April 711 and landed somewhere near Gibraltar. Mons Calpe became Jebel Tariq, the Mount of Tariq, and the Arabic was worn down into the name the place still carries. The first fortifications came much later, in 1160, when the Almohad Sultan Abd al-Mu'min had a walled town laid out on the upper slopes against the Christian kings of Aragon and Castile.
The medieval record is a list of sieges. Ferdinand IV of Castile took Gibraltar in 1309 after a month, when it held around 1,200 people, and expelled its Muslim inhabitants. The Marinids of Fez retook it in 1333. Alfonso XI died of the Black Death in 1350 while besieging it again. A small Castilian force under Alonso de Arcos finally took it by surprise in August 1462, while the senior commanders were away paying homage to a new sultan in Granada, and the Muslim population was expelled a second time.
Castilian Gibraltar changed hands among the nobility before the crown reclaimed it. The Duke of Medina Sidonia sold it in 1474 to a group of converso families from Córdoba and Seville, 4,350 people who were expelled two years later. Isabella I made it crown property again in 1501, and in 1502 granted the arms that Gibraltar still uses: a castle with a golden key hanging from its gate. Her warrant called the town the key between the eastern and western seas and forbade any future monarch from ever alienating it from the Crown of Castile.
Once Granada fell in 1492, the Rock lost most of its purpose as a frontier post, and Barbary pirates raided it in September 1540, carrying off hundreds of residents as hostages or slaves.
Why almost the whole town left with the garrison
Gibraltar was taken in the War of the Spanish Succession, and it was taken in the name of a Spanish king. An Anglo-Dutch fleet under Admiral Sir George Rooke attacked on 1 August 1704, bombarded the town on 2 August, and landed marines who advanced from the isthmus and from Europa Point at once. The governor, Diego de Salinas, surrendered on the morning of 4 August. The terms named the Habsburg claimant Charles III as the town's lawful king and offered the inhabitants their existing rights and their religion if they swore loyalty to him.
They refused. When the Spanish garrison marched out on 7 August 1704, some 4,000 people went with it, loyal to the Bourbon Philip V, and took the records of the city council with them, including the town's banner and its royal warrant. Many settled among the ruins of Algeciras or around an old hermitage at the head of the bay, expecting a prompt return. The hermitage camp grew into San Roque, which Philip V described in 1706 as the City of Gibraltar resident in its Campo. Around seventy people stayed behind on the Rock, mostly Genoese.
A Franco-Spanish army of around 7,000 men laid siege from 9 October 1704, helped by refugees from the town, against about 2,000 defenders. Reinforcements of 2,200 arrived by sea that December and the besiegers gave up on 31 March 1705. By 1707 London was appointing governors with no claim to be acting for Charles at all.
The population that would later call itself Gibraltarian was assembled after 1704, from people who arrived under British rule, and in 1967 Spain would name the descendants of the exiles as the real Gibraltarians.
What the Utrecht treaty gave Britain and withheld
The war ended in a group of settlements signed at Utrecht, and Article X of the treaty of 13 July 1713 dealt with Gibraltar. It is short, and most of its clauses have since been ignored or argued over.
| Article X provides | What became of it |
|---|---|
| Town, castle, port and forts yielded to Britain for ever | Upheld by Britain; reconfirmed at Seville in 1729 and Paris in 1783 |
| No territorial jurisdiction and no open communication by land | Disputed: Spain reads it as excluding the isthmus, Britain claims the southern half by long possession |
| Provisions bought from Spain only when the sea route is unsafe | Argued superseded by EU membership from 1973; the 2026 agreement sets up a customs union with the EU |
| No leave for Jews or Moors to reside in the town | Ignored: 863 Jews lived there by 1777 |
| Spain has first refusal if Britain ever gives the town up | Still cited: Britain reads it as ruling out independence without Spanish consent |
How Britain nearly traded the Rock away
The British government first treated the place as a bargaining counter. On seven occasions between 1713 and 1728 ministers proposed to exchange it for concessions from Spain, and each time Parliament vetoed the plan after public protest. Spain, for its part, declared the Gibraltar provisions void in January 1727, citing fortifications built past the agreed limits, the Jews and Moors living in the town and smuggling, and besieged it from February to June of that year.
How Spain drew a line across the isthmus
The Treaty of Seville confirmed British possession in 1729. Spain answered in 1730 by building a line of fortifications across the upper end of the isthmus, which the British called the Spanish Lines and Spain the Línea de Contravalación, and cut the town off from its hinterland. Gibraltar fed itself by trading with Morocco. The name of the line survives in the Spanish town of La Línea de la Concepción, which grew up on its site in the following century.
The garrison town filled slowly. In 1754 there were 1,733 civilians beside 3,000 soldiers and 1,426 members of their families. By 1777 the civilian count was 3,201: 519 Britons, 1,819 Roman Catholics of Spanish, Portuguese and Genoese origin, and 863 Jews.
How the Great Siege ended talk of a trade
Spain joined the American War of Independence against Britain and, with French help, tried to take Gibraltar back. The siege began on 24 June 1779 and ran for three years and seven months. The Gibraltar Museum gives the garrison as 7,000 men against 40,000 French and Spanish troops.
Blockade by sea failed because relief convoys got through, under Admiral Rodney in January 1780 and Admiral Darby in April 1781. After Darby's arrival the Spanish batteries turned on the town itself, and two years of shelling left nothing standing of the architecture of the Spanish period. On the night of 26 November 1781 about 2,500 men crossed the isthmus in a sortie, destroyed 28 pieces of artillery and took a Spanish logbook in which the entry for that night had already been written as "nothing occurred this night".
The garrison also dug. In February 1782 Lieutenant Koehler of the Royal Artillery demonstrated a depression carriage that let a cannon fire steeply downward from the North Face, and in May a party under Sergeant Major Henry Ince began the first tunnel in Gibraltar; the galleries eventually held 17 guns. The Grand Attack of 13 September 1782 sent ten floating batteries against the King's Bastion, and the defenders set them alight with cannonballs heated red in furnaces. The siege was lifted in February 1783. British losses, by the museum's count, were 333 killed and 138 disabled by enemy action, and another 536 dead of sickness.
The result settled the argument in London. George III wrote that he would not think the peace complete without being rid of Gibraltar, and the outcome of the siege made that politically impossible. The phrase "strong as the Rock of Gibraltar" dates from this reputation.
Who the Gibraltarians became inside the fortress
The civilian population had fallen below a thousand by the end of the siege. It refilled from the Mediterranean. Genoese fleeing Napoleon's annexation of their republic arrived in numbers, and by 1813 the town was nearly a third Genoese and Italian, 20% Portuguese, 16.5% Spanish, 15.5% Jewish, 13% British and 4% Menorcan. Disease kept it small: an epidemic in the second half of 1804 killed more than a third of everyone on the Rock, civilian and military.
How the colony took shape after the siege
Civil institutions followed the peace. Governor Sir George Don brought drainage, street lighting and a rebuilt civilian hospital from 1814, a City Council was set up in 1821, and in 1830 Gibraltar became a Crown colony with its own police force and Supreme Court. The first steamship reached the harbour in 1823, and the trade that followed, coaling and victualling ships on the way east, drew large numbers of Spanish labourers. The shanty town they built on the ruins of the old Spanish Lines became La Línea, whose population doubled between 1830 and 1880 and doubled again in the next twenty years, while Gibraltar's barely moved.
The Gibraltarians as a legal category were a product of overcrowding. Orders in Council in 1873 and 1885 restricted the right of residence to people born in Gibraltar, and everyone else needed a permit unless employed by the Crown. By 1891 nearly 75% of a population of 19,011 had been born there, 14,244 people in all.
How the frontier moved onto the isthmus
The treaty ceded the town and its forts. It said nothing about the sandy neutral ground to the north, about a kilometre wide, the range of a cannon shot in 1704. A yellow fever epidemic in 1815 led Spain to allow a temporary quarantine camp on the isthmus, and the British did not remove it; more camps followed an epidemic in 1854. An airfield was laid out there in 1933 and the aerodrome built in 1938 and 1939 completed the occupation of some 800 metres of the isthmus. Spain holds that this ground was never ceded and that the airfield occupies it illegally. The United Kingdom claims it by continuous possession over a long period. This catalogue records both positions and takes neither.
What the war and the closed frontier did
In May 1940, with France falling and Spain's entry into the war feared, the British government evacuated the entire civilian population. Most went to London, to Fulham and Kensington, and others to Ballymena, Madeira and a camp in Jamaica, under the principle that "the fortress comes first". Behind them the garrison dug more than 50 kilometres of tunnels into the Rock, and by 1943 it had grown to 17,000 men. Returns began in April 1944; the last evacuees came home in February 1951. The Culture of Gibraltar entry on Wikipedia records that the evacuation strengthened a distinctly Gibraltarian identity, and that the return itself was won by campaigning.
How self-government grew after the evacuation
The returning civilians took over most of their own government in stages. The Association for the Advancement of Civil Rights, led by the lawyer Joshua Hassan, won every seat in the City Council elections of 1945. Women got the vote in 1947, a Legislative Council followed in 1950, and in 1964 the British government confined the governor's powers to defence, security and foreign relations.
How a referendum closed the border
The United Nations decolonisation agenda gave Spain a new argument. Britain had listed Gibraltar in 1946 among its dependent territories, but Article X meant it could only be British or Spanish, and the general route to independence was closed to it. Gibraltar held a referendum in September 1967: 12,138 voters chose to stay with Britain, 44 chose Spanish sovereignty, and 55 slips were blank or invalid. Spain rejected the vote, calling the voters "pseudo-Gibraltarians" and naming as the real Gibraltarians the descendants of the families who left in 1704. The date, 10 September, is Gibraltar's National Day.
Spain had been tightening the border since 1954, closed it to vehicles in 1966 and closed its airspace to flights using Gibraltar's airport in 1967. The Gibraltar Constitution Order of 1969 replaced the councils with a House of Assembly of 15 elected members, and Spain responded by closing the frontier completely and cutting the telephone lines that ran through Spain. For families on both sides of the wire, news of the sick had to travel by radio or by a detour through Tangier.
How the land border opened and then came down
Talks followed Franco's death in 1975. The Lisbon Agreement of 1980 committed both governments to negotiate, the frontier partially reopened in 1982, the Brussels agreement of 1984 let Spaniards live and work in Gibraltar, and the gates were fully reopened on 4 and 5 February 1985, before Spain joined the European Community. Gibraltarians had received full British citizenship in 1981. Britain had ruled out integration into the United Kingdom in the Hattersley Memorandum of 26 June 1976. The naval dockyard closed after 1985, and the British garrison, present since 1704, was withdrawn in 1990 and replaced by the locally recruited Royal Gibraltar Regiment.
Sovereignty stayed in dispute. By 2002 Britain and Spain had drafted a proposal to share sovereignty, and Gibraltar put it to a referendum that rejected it by 17,000 votes to 187; both governments held the result to have no legal weight, and the talks stalled. A new constitution was approved by referendum on 30 November 2006 and made by Order in Council on 14 December 2006. Its preamble records the British assurance that the people of Gibraltar will never pass under another state's sovereignty against their freely and democratically expressed wishes. The Córdoba Agreement of September 2006 opened the airport to flights from Spain, and on 21 July 2009 a Spanish minister visited Gibraltar for the first time since 1704.
How Brexit reopened the question of the fence
Gibraltar voted about 96% to remain in the European Union in 2016 and left with the United Kingdom in January 2020. At Spain's insistence it was kept out of the UK's post-Brexit trade agreement, and a separate framework was agreed on 31 December 2020. Negotiations ran from October 2021, a draft was published on 26 February 2026, the Gibraltar Parliament passed the implementing legislation on 31 March 2026, and the treaty was signed on 14 July 2026 and applied provisionally from the following day.
The House of Commons Library counted over 15,000 frontier workers in 2026, living in Spain and making up more than half of Gibraltar's workforce. The treaty moves the checks to the port and the airport, where Gibraltar's officers and Spanish officers applying Schengen rules both inspect arrivals, sets up a customs union with the EU and allows the 1.2 kilometre fence to be removed. Article 2 states that it is without prejudice to either state's position on sovereignty. The European Parliament's consent vote is scheduled, indicatively, for 14 December 2026.
The positions it leaves in place are recorded here as their holders state them. The United Nations lists Gibraltar as a Non-Self-Governing Territory. The Government of Gibraltar holds that the territory has been decolonised, and that the right of self-determination under the UN Charter prevails over the reversion clause of 1713. Spain maintains its claim and disputes the legality of the 2006 constitution.
Timeline
The dates in order
- 711
- Tariq ibn Ziyad lands near the Rock. It becomes Jebel Tariq.
- 1160
- Abd al-Mu'min orders the first fortifications.
- 1309
- Castile takes Gibraltar after a month's siege.
- 1333
- The Marinids of Fez retake it.
- 1462
- A Castilian force takes it by surprise in August.
- 1502
- Isabella I grants the arms with the castle and key.
- 1704
- Rooke's fleet takes the town on 4 August. About 4,000 inhabitants leave on 7 August.
- 1713
- Article X of the Treaty of Utrecht cedes the town, castle and port on 13 July.
- 1730
- Spain fortifies a line across the isthmus.
- 1779
- The Great Siege begins on 24 June. It is lifted in February 1783.
- 1830
- Gibraltar becomes a Crown colony.
- 1940
- The whole civilian population is evacuated in May.
- 1967
- A referendum on 10 September returns 12,138 votes for Britain and 44 for Spain.
- 1969
- A new constitution. Spain closes the frontier completely.
- 1985
- The frontier fully reopens on 4 and 5 February.
- 1990
- The British garrison present since 1704 is withdrawn.
- 2002
- Joint sovereignty is rejected by 17,000 votes to 187.
- 2006
- A new constitution is approved by referendum on 30 November.
- 2026
- The UK-EU agreement is signed on 14 July and applied from 15 July.
Common questions
Questions about Gibraltar
Why can Gibraltar not simply become independent?
Article X of the Treaty of Utrecht of 1713 gives the Crown of Spain first refusal if Britain ever gives the town up. The British government reads that clause as meaning independence would need Spanish consent, and it has also ruled out integrating Gibraltar into the United Kingdom, in the Hattersley Memorandum of 1976. The Government of Gibraltar argues that the right of self-determination in the UN Charter prevails over any older treaty.
What happened to the Spanish inhabitants in 1704?
Almost all of them left. About 4,000 people marched out behind the Spanish garrison on 7 August 1704 refusing to swear loyalty to the Habsburg claimant, taking the council's records, banner and royal warrant. They settled around Algeciras and at a hermitage that grew into San Roque, which Philip V called the City of Gibraltar resident in its Campo. Around seventy people, mostly Genoese, stayed.
How long was the border with Spain shut?
Spain closed it to vehicles in 1966 and completely in 1969, after the new constitution, and cut the telephone links that ran through Spain. Restrictions on trade and on the movement of people and vehicles had been tightening since 1954. The frontier partially reopened in 1982 and fully on 4 and 5 February 1985.
Why is Gibraltar's airport part of the sovereignty dispute?
It stands on the isthmus, on ground that the Treaty of Utrecht did not mention. The strip was neutral ground in 1704, about a kilometre wide. British quarantine camps were set up there after epidemics in 1815 and 1854, an airfield followed in 1933, and the aerodrome was built in 1938 and 1939. Spain says the land was never ceded and the airfield is occupied illegally; the United Kingdom claims it by long, continuous possession. The 2026 agreement leaves the RAF base out of its scope.
Did the 2026 agreement settle who owns Gibraltar?
No. Article 2 of the UK-EU agreement signed on 14 July 2026 says it is without prejudice to the British and Spanish positions on sovereignty and cannot be the basis of any claim. It deals with movement: Schengen checks move to the port and airport, a customs union with the EU is set up, and the fence on the land border can come down.




