Ceuta and Melilla are two Spanish autonomous cities on the Mediterranean coast of North Africa, and their fenced land borders with Morocco, about 8 km around Ceuta and about 10.5 km around Melilla, are the only land borders between the European Union and an African country. Ceuta faces the Strait of Gibraltar just 17 km from mainland Spain; Melilla lies further east beside the Moroccan city of Nador. Both lines matter far beyond their length: they divide towns that share families, languages and trade, they have been the scene of repeated mass crossings by migrants, and Morocco has claimed both cities since its independence in 1956 while Spain treats them as integral parts of its territory.
Taken together with the 85-metre frontier at the rocky Peñón de Vélez de la Gomera, which became a peninsula when a storm in the early 1930s built a sand spit to the mainland, Spain and Morocco share just 18.5 km of land border. Each of the two main lines cuts across a distinct piece of country.
Monte Hacho, the Almina isthmus and Ceuta's hills
Ceuta covers 18.5 square kilometres. Its old core occupies the La Almina peninsula, a knuckle of land tied to Africa by a very narrow isthmus. The Phoenicians saw the defensive value of that neck of land early in the first millennium BC, and the city's Latin name, Septem Fratres, came from the seven hills around the site; it survives in the Arabic Sabtah and in Ceuta itself. At the tip of the peninsula stands Monte Hacho, one of the two candidates for the southern Pillar of Hercules. The other candidate is Jebel Musa, a mountain that rises just across the border in Morocco.
West of the isthmus the city widens into hill country. Monte Anyera, a hill on the western frontier that dominates the city, is guarded by a Spanish military fort. The climate is mild and maritime: the city's weather station records an average annual temperature of 18.8 °C and about 849 mm of rain a year, nearly all of it outside the very dry summers.
From Benzú to El Tarajal along the Ceuta line
The Ceuta frontier runs roughly north to south across the neck of land between two coasts. Sources give its length as anywhere from 6.4 km to 8 km, depending on how the coastal ends are measured. It was fixed by treaties of 7 October 1844 and 6 May 1845, then pushed outward to its present course by the Treaty of Wad-Ras of 26 April 1860, signed after Spain won the Hispano-Moroccan War of 1859–60.
At the northern end sits Benzú, a small settlement of 1,170 people in 2010 with the last beach before Morocco. Caves and rock shelters here show seven levels of human occupation reaching back some 250,000 years. From Benzú a pedestrian crossing leads to the Moroccan village of Belyounech, beneath Jebel Musa, known locally as the "Dead Woman" for its reclining profile.
The southern end meets the Mediterranean at El Tarajal, the single road checkpoint for cars and pedestrians. Between the two crossings the border is closed and inaccessible. The two coastal ends matter most for migration: in May 2021 people waded and swam around the breakwaters at Benzú and El Tarajal at low tide rather than climbing the fence.
Fnideq, Belyounech and the people who cross at Ceuta
The Moroccan side belongs to the M'diq-Fnideq Prefecture. Fnideq, known in Spanish as Castillejos, is the nearest Moroccan town, 31 km north of Tétouan and the site of the Battle of Castillejos in the 1859–60 war; rural Belyounech is closer still. Their economies were long tied to Ceuta, which sits outside the EU customs union.
The result was the "atypical trade", as Spanish officials called it. Porteadoras, mostly women and often widows or divorcees, carried bales of goods on their backs from Ceuta and Melilla into Morocco, where goods carried by hand were treated as duty-free personal baggage. Estimates put the value above €1.4 billion a year across both cities. Crossings at Ceuta were eventually capped at about 4,000 porters a day. Residents of the neighbouring provinces of Tétouan and Nador did not need a visa to enter. In 2020 Morocco closed both borders as part of its COVID-19 measures, cutting the trade off.
Inside Ceuta, the population was 83,299 in 2024. In 2006 about 51% were Christian and 48% Muslim, and a 2018 estimate found roughly 68% of residents had been born in the city. Spanish is the only official language, but Darija Arabic in its local Ceuta form is widely spoken, by an estimated 40–42% of people in 2025. A Hindu community present since 1893, enlarged by Sindhi Hindus who arrived after the 1947 partition of India, and a small Sephardic Jewish congregation complete the mix.
Melilla between Cape Three Forks and Mount Gurugú
Melilla, at 12.3 square kilometres, is smaller than Ceuta and lies on the eastern side of Cape Three Forks (Cabo Tres Forcas), a headland jutting into the Alboran Sea. The city is laid out in a wide semicircle around its beach and port. The original fortress, Melilla la Vieja, stands on a mound about 30 metres high. Behind the city rises Mount Gurugú, a Moroccan massif of around 900 metres in the Rif, and through the city runs the Río de Oro, an intermittent stream that is dry for much of the year.
Water is the constraint that geography imposes here. Melilla long drew on dug wells and on water flowing beneath the Río de Oro's bed, but by the early 2000s the wells were over-pumped and seawater was seeping in. A desalination plant on the Aguadú cliffs, designed for 22,000 cubic metres a day, came into operation in March 2007.
Castilian forces occupied Melilla on 17 September 1497. In 1860 its civilian population was only about 375. The line was drawn around it by an 1859 treaty that also created a neutral zone. After the 1860 peace, Spain was entitled to land as far as a cannon could fire from the walls. That proved impossible to apply, so a further treaty of 30 October 1861, confirmed on 26 June 1862, fixed the modern boundary. Free-port status from 1863 drew Sephardic Jews from Tétouan, mainland Spaniards and Riffian Berbers, and by 1896 the city held 10,004 people.
Beni Ansar, Nador and the Melilla conurbation
Immediately south lies Beni Ansar, a town of 50,508 people in the 2024 census whose port, usually called Nador Port, is one of Morocco's main harbours. Its streets run between the slopes of Gurugú to the west and the salt lagoon of Mar Chica, also called the Bou Areg Lagoon, to the east. Nador itself, with 158,202 people in 2024, lies 10 km south of Melilla; it is the largest mainly Riffian city in Morocco, and its port shares a bay with Melilla's.
Geographers describe a single cross-border conurbation stretching south along the R19 road from Beni Ansar through Nador to Selouane. Melilla supplies services, finance and trade; Nador is the industrial centre; the smaller Moroccan settlements supply labour. About 36,000 Moroccans crossed daily to work, shop or trade, many in domestic service, construction or carrying bales. The visa exemption for residents of Nador province drew internal migrants from elsewhere in Morocco to Nador simply to qualify.
Within Melilla, which had 87,067 residents in 2025, the population is divided mainly between people of Iberian and Riffian descent. One estimate using 2020 official data put Muslims at 53.2% of the population. Spanish is official, while Tarifit, the Berber language shared with the Nador area, is spoken at home by many families. The city keeps around 1,000 Jews, down from about 7,000 around 1930, and a Hindu community of about 100. Three roads cross into Morocco, all through checkpoints. In 2018 Morocco closed its customs office on the Melilla border, a move expected to redirect trade to Nador's own port.
Six-metre fences and a claim from Rabat
Spain began fencing both cities in 1993. Ceuta's first barrier was 2.5 metres high and 8.4 km long; a new system from 1995 raised it to 3 metres, and in 2005 both cities doubled their fences to 6 metres. The standard design has parallel fences with a patrol road between them. Underground cables link floodlights, noise and movement sensors and cameras to a control room. Melilla's third barrier alone cost about €33 million. On the Moroccan side a further 3-metre razor-wire fence and a ditch were added, and from 2020 Spain began removing razor wire from Melilla's crest while raising some stretches above 10 metres.
The fences have not ended the crossings, and several have been deadly. In autumn 2005 hundreds of migrants rushed the Ceuta fence on 7 October; between 13 and 18 died. At Melilla, repeated attempts that season carried about 700 people over the line, and six died in clashes with Moroccan security forces. On 17 May 2021 between 6,000 and 8,000 people entered Ceuta around the breakwaters after Moroccan border controls were relaxed. The relaxation came in the middle of a diplomatic dispute over Spain giving hospital treatment to the Polisario Front leader Brahim Ghali. On 24 June 2022 about 2,000 people approached the Melilla crossing from the forests near Nador; 23 died in a crush at the fence, by official count, while NGOs estimated at least 37, and 133 reached Spanish soil. On 30 July 2026, during Morocco's Throne Day celebrations, a far larger crossing began at the Tarajal breakwater; Spanish estimates of arrivals ran from about 49,000 in the first 24 hours to as many as 80,000.
Sovereignty sits beneath all of this. Portugal took Ceuta in 1415; it passed to the Spanish crown during the Iberian Union and stayed Spanish when Portugal regained independence, a choice Portugal accepted in the Treaty of Lisbon of 1668. Neither city belonged to the protectorate that Spain held over northern Morocco from 1912, so neither was handed over when that protectorate ended in 1956. Morocco frequently describes both as occupied, pointing to the fact that they are surrounded by Moroccan land and sea. Spain's official position is that both are integral parts of Spain, held since the 15th and 16th centuries, and it declines to discuss their sovereignty. King Juan Carlos I's visit in November 2007, the first by a Spanish head of state since 1927, drew a formal Moroccan protest.
Their unusual status makes both cities textbook cases of territory cut off from its home country, a situation explored in our guide to enclaves and exclaves. The same frontiers also appear in the wider list of countries that border Morocco, and Ceuta's position makes sense only alongside the narrow sea lane beside it, covered in our guide to the Strait of Gibraltar.
