Ceuta (, ; ; ) is an autonomous city of Spain on the North African coast. Bordered by Morocco, it lies between the Mediterranean Sea and the Atlantic Ocean. Ceuta is one of the special territories of members of the European Economic Area: it is part of the Schengen area, but with specific provisions such as border checks between Ceuta and European Spain.

Phoenicians founded a settlement on the La Almina Peninsula, which had continuity under Roman and Byzantine rule (Septem Fratres). It was annexed to the early caliphates upon the Islamic conquest of the Maghreb, only to be destroyed during the Berber Revolt. It was rebuilt in the ninth century by Majkasa Ghomaras. For much of the Middle Ages, regional powers north and south of the Strait of Gibraltar vied for control over Ceuta, which was a key contested port in the so-called Battle of the Strait. In 1415, Marinid Ceuta was conquered and annexed by the Kingdom of Portugal. In 1580, it was annexed by the Hispanic Monarchy, and the city chose to remain under Spanish authority after 1640. Ceuta belonged to the Spanish province of Cádiz as a regular municipality until the passage of its Statute of Autonomy in March 1995, when it became an autonomous city.

Along with the Canary Islands, Ceuta was classified as a free port before Spain joined the European Union. Its population is predominantly made up of Spanish Christians and Arab Muslims, with a small minority of Sephardic Jews, and Sindhi Hindus from pre-partition India. Spanish is the official language of Ceuta, while Darija Arabic (in the Ceuta Arabic dialect) is also widely spoken.

Names The name Abyla has been said to have been a Punic name ("Lofty Mountain" or "Mountain of God") for Jebel Musa, the southern Pillar of Hercules. The name of the mountain was in fact Habenna (, , "Stone" or "Stele") or ʾAbin-ḥīq (, , "Rock of the Bay"), about the nearby Bay of Benzú.. The name was hellenized variously as Ápini (), Abýla (), Abýlē (), Ablýx (), and Abilē Stḗlē (, "Pillar of Abyla") and in Latin as ("Mount Abyla") or ("the Pillar of Abyla").

The settlement below Jebel Musa was later renamed for the seven hills surrounding the site, collectively referred to as the "Seven Brothers" (;Ptolemy, Geography, IV.i.5. ).In, e.g., Pomponius Mela. In particular, the Roman stronghold at the site took the name "Fort at the Seven Brothers" (). This was gradually shortened to Septem ( Sépton) or, occasionally, Septum or Septa. These clipped forms continued as Berber Sebta and Arabic Sabtan or Sabtah (), which themselves became in Portuguese () and Spanish (locally ).

History Ancient

Controlling access between the Atlantic Ocean and the Mediterranean Sea, the Strait of Gibraltar is an important military and commercial chokepoint. The Phoenicians realized the extremely narrow isthmus joining the La Almina Peninsula to the African mainland made Ceuta eminently defensible and established an outpost there early in the 1st millenniumBC.

The Greek geographers record it by variations of Abyla, the ancient name of nearby Jebel Musa. Beside Calpe, the other Pillar of Hercules now known as the Rock of Gibraltar, the Phoenicians established Kart at what is now San Roque, Spain. Other good anchorages nearby became Phoenician and then Carthaginian ports at what are now Tangier, Morocco and Cádiz.

After Carthage's destruction in the Punic Wars, most of the Maghreb was left to the Roman client states of Numidia and Mauretania. Punic culture continued to thrive in what the Romans knew as "Septem". After the Battle of Thapsus in 46 BC, Caesar and his heirs began annexing North Africa directly as Roman provinces. As late as Augustus, most of Septem's Berber residents continued to speak and write in Punic.

Caligula executed the Mauretanian king Ptolemy in AD40 and seized his kingdom, which Claudius organised in AD 42, placing Septem in the province of Tingitana and raising it to the level of a colony. It was Romanized and thrived into the late 3rd century, trading heavily with Roman Spain and becoming well known for its salted fish. Roads connected it overland with Tingis (Tangiers) and Volubilis. Under in the late 4th century, Septem still had 10,000 inhabitants, nearly all Christian citizens speaking African Romance, a local dialect of Latin.

Medieval

Vandals, probably invited by Count Boniface as protection against the empress dowager Galla Placidia, crossed the strait near Tingis around 425 and swiftly overran Roman North Africa. Their king, Gaiseric, focused his attention on the rich lands around Carthage. Although the Romans eventually accepted his conquests and he continued to raid them anyway, he soon lost control of Tingis and Septem in a series of Berber revolts. When Justinian decided to reconquer the Vandal lands, his victorious general Belisarius continued along the coast, making Septem a westernmost outpost of the Byzantine Empire around 533. Unlike the former ancient Roman administration, Eastern Rome did not push far into the hinterland and made the more defensible Septem their regional capital in place of Tingis.

The plague of Justinian, less capable successors, and overstretched supply lines forced a retrenchment and left Septem isolated. It is likely that its count () was obliged to pay homage to the Visigoth Kingdom in Spain in the early 7th century. There are no reliable contemporary accounts of the end of the Islamic conquest of the Maghreb around 710. Instead, the rapid Muslim conquest of Spain produced romances concerning Count Julian of Septem and his betrayal of Christendom in revenge for the dishonor that befell his daughter, Florinda la Cava, at King Roderick's court. Allegedly with Julian's encouragement and instructions, the Berber convert and freedman Tariq ibn Ziyad took his garrison from Tangiers across the strait and overran the Spanish so swiftly that both he and his master Musa bin Nusayr fell afoul of a jealous caliph, who stripped them of their wealth and titles.

After the death of Julian, sometimes also described as a king of the Ghomara Berbers, Berber converts to Islam took direct control of what they called Sebta. It was then destroyed during their great revolt against the Umayyad Caliphate around 740. Sebta remained a small village of Muslims and Christians surrounded by ruins until its resettlement in the 9th century by Mâjakas, chief of the Majkasa Berber tribe, who started the short-lived Banu Isam dynasty.. His great-grandson briefly allied his tribe with the Idrisids.

Banu Isam rule ended in 931, when he abdicated in favour of Abd ar-Rahman III, the Umayyad emir of Córdoba who had self-proclaimed as a caliph in 929. Through the overseas conquests of Ceuta in 931 and Melilla in 927 that allowed enforcement of direct political and military influence in the fragmented landscape of the north-African coast, crowned by the skillful political subversion resulting in the 944 revolt in eastern Berbery, the power exerted by the Umayyad Caliphate (engaged in struggle against the Fatimids) in the Western Mediterranean took hold.

Chaos ensued with the collapse of the Caliphate of Córdoba in the early 11th century. In the wake of this, the Banū Hammūd established a petty kingdom, and nominal caliphate, centered in Málaga and Ceuta—the so-called Taifa of Málaga—with Málaga as a capital and Ceuta hosting the heir's residence. In 1056, the link with Málaga was severed as it was conquered by the Banu Ziri, while Suqut al-Bargawati remained in power in Ceuta, styling as a caliph after 1061.

Starting in 1084, the Almoravid Berbers ruled the region until 1147, when the Almohads conquered the land. Apart from Ibn Hud's rebellion in 1232, they ruled until the Tunisian Hafsids established control. The Hafsids' influence in the west rapidly waned, and Ceuta's inhabitants eventually expelled them in 1249. After this, a period of political instability persisted, under competing interests from the Marinids and Granada as well as autonomous rule under the native Banu al-Azafi. The Fez-based Marinid sultanate finally conquered the region in 1387, with assistance from Aragon.

Portuguese

On the morning of 21 August 1415, King John I of Portugal led his sons and their assembled forces in a surprise assault that would come to be known as the Conquest of Ceuta. The 45,000 Portuguese who traveled on 200 ships caught the defenders of Ceuta off guard and suffered only eight casualties. By nightfall the town was captured. On the morning of 22 August, Ceuta was in Portuguese hands.

Álvaro Vaz de Almada, 1st Count of Avranches was asked to hoist what was to become the flag of Ceuta, which is identical to the flag of Lisbon, but in which the coat of arms derived from that of the Kingdom of Portugal was added to the center. The original Portuguese flag and coat of arms of Ceuta remained unchanged, and the modern-day Ceuta flag features the configuration of the Portuguese shield.

John's son Henry the Navigator distinguished himself in the battle, being wounded during the conquest. The looting of the city proved to be less profitable than expected for John I, so he decided to keep the city to pursue further enterprises in the area. From 1415 to 1437, Pedro de Meneses was the first governor of Ceuta. The Marinid Sultanate started the 1419 siege. They were defeated by the first governor of Ceuta, before reinforcements arrived in the form of John, Constable of Portugal and his brother Henry the Navigator, who were sent with troops to defend Ceuta.

Under King John I's son, Duarte, the city of Ceuta rapidly became a drain on the Portuguese treasury. Trans-Saharan trade journeyed instead to Tangier. It was soon realized that without the city of Tangier, possession of Ceuta was worthless. In 1437, Duarte's brothers Henry the Navigator and Fernando, the Saint Prince persuaded him to launch an attack on the Marinid sultanate. The resulting Battle of Tangier (1437), led by Henry, was a total failure. In the resulting treaty, Henry promised to deliver Ceuta back to the Marinids in return for allowing the Portuguese army to depart unmolested, which he reneged on.

The Portuguese conquest marked Portugal's first hold in the strategic area of the Strait of Gibraltar. The development had a mixed reception from Castile, which had to the same in 1292 in the wake of the Conquest of Tarifa on the north side, as it marked the arrival of a potential challenger for hegemony in the area. Whatever the case, the authorities soon established collaboration with Tarifa across the Strait, and throughout the 15th century Ceuta relied on support from coastal Andalusian towns. Cross strait collaboration with Ceuta and other Portuguese outposts in the area (Ksar es-Seghir, Tangier, and Asilah) from Gibraltar and Málaga or Cádiz and Puerto de Santa María (depending on prevailing winds) was sustained in the 1520s. In the case of Ceuta, this collaboration strengthened after 1580.

Portuguese expansion throughout the coasts of the Maghreb took place on the basis of the presence of grain, cattle, sugar, and textiles, as well as fish, hides, wax, and honey. The city was recognized as a Portuguese possession by the Treaty of Alcáçovas (1479) and by the Treaty of Tordesillas (1494). In the 1540s, the Portuguese began building the Royal Walls of Ceuta as they are today including bastions, a navigable moat and a drawbridge. Some of these bastions are still standing, like the bastions of Coraza Alta, Bandera and Mallorquines. Luís de Camões lived in Ceuta between 1549 and 1551, losing his right eye in battle, which influenced his work of poetry Os Lusíadas.

Hispanic Monarchy