The settlement later called Anfa stood on the Atlantic coast of the Chaouia plain in western Morocco, a site occupied by Berber communities by the seventh century BC and used as a port first by Phoenicians and then by Romans. Leo Africanus placed Anfa inside the Berber kingdom of Barghawata, which rose as an independent state around 744 CE and endured until the Almoravids conquered it in 1068. Archaeological and textual sources describe a hill-top structure above the old ruins that sailors used as a landmark, and the surrounding plain became a supplier of agricultural goods to the port.
Under the Merinids in the fourteenth century Anfa grew as a harbor, and after a popular revolt ousted the last Merinid ruler in 1465 the town became an independent state once again and a refuge for pirates and privateers. The Portuguese bombarded it into ruins in 1468, and the Portuguese mariners who rebuilt their trade there named it Casa Branca, a calque later reproduced in Arabic as ad-Dar al-Bayda. The 1755 earthquake destroyed the town again, and Sultan Mohammed ben Abdallah rebuilt the port and walls between 1756 and 1790, partly to forestall a Christian return after the Portuguese evacuation of Mazagan in 1769.
Nineteenth-century wool exports to British textile mills and tea imports for Moroccan mint tea tied the town's trade to British shipping, and its population rose from roughly 5,000 in the 1860s to about 12,000 within a few years of the French arrival in 1906. The Treaty of Algeciras placed customs revenue under French officers and created a French-and-Spanish-trained police force to patrol the port. Laborers building the breakwater laid a narrow-gauge track through the sacred Sidi Belyout graveyard, and when Chaouia tribesmen attacked the locomotive in 1907, nine Compagnie Marocaine workers died. The French bombardment that August killed between 600 and 3,000 Moroccans, and the Mellah, the Jewish quarter, was sacked and set alight.
French authorities formalized control through the 1912 Treaty of Fez, made Rabat the administrative capital and Casablanca the economic capital, and assigned Henri Prost to lay out a European ville nouvelle beside a separate ville indigène for Moroccan migrants. The city's population reached 110,000 by 1921, much of it housed in shanty towns. In January 1943 Churchill and Roosevelt met here during the Anfa Conference, where the Allies adopted the doctrine of unconditional surrender, and Roosevelt privately voiced support for Moroccan independence, a remark that emboldened nationalists to demand complete independence.
The Barghawata Confederation rose from Berber tribes of the western Moroccan coast who rejected Abbasid and Umayyad authority, forging an independent state rooted in a distinctive Berber Islam. At its height it controlled roughly 38,057 square kilometres along the Atlantic seaboard, with its heartland on the Chaouia plain and settlements including Anfa, the place later known as Casablanca. Its rulers governed through tribal councils rather than a single hereditary throne, and the confederation endured for more than two centuries before the Almoravid conquest brought it to an end.
Wars & turning points
Wars, rebellions & turning points
- Barghawata Berbers versus Abbasid authority
Ṣāliḥ ibn Manṣūr united western Moroccan Berber tribes and broke from Abbasid overlordship, founding an independent confederation on the Atlantic coast.
Outcome: A self-governing Barghawata state emerged and endured for over two centuries.
Follow Barghawata - Almoravid forces versus Barghawata Confederation
Almoravid armies moved north from the Sahara and conquered the Barghawata state, ending its independent existence on the Chaouia plain and Atlantic coast.
Outcome: Barghawata territory was absorbed into the Almoravid realm, and its distinct religious order was suppressed.
Follow Maghreb
Achievements & reckoning
Achievements
-
The Barghawata Confederation maintained sovereignty for roughly 272 years, from 793 to 1065 CE, controlling about 38,057 square kilometres of Atlantic Morocco and its coastal settlements.
-
The confederation developed a localized form of Islam in the Tamazight language, with its own prayers and religious practices that set it apart from Abbasid and Umayyad orthodoxy.
Reckoning
-
The Almoravid conquest around 1065–1068 CE ended Barghawata independence, absorbed its lands into a larger empire, and suppressed its distinct Berber religious institutions.
Follow Almoravids -
Rule by confederate councils rather than a centralized bureaucracy left the state vulnerable to outside conquest and produced no enduring capital or standing administration after its fall.
Follow Barghawata
Deeper cuts
Berber Islam of the Barghawata
The Barghawata practiced a distinctive form of Islam rooted in Berber identity rather than Abbasid or Umayyad orthodoxy. Their ruler Ṣāliḥ ibn Manṣūr claimed prophetic authority and taught prayers and doctrines in Tamazight, the local Berber language, alongside Arabic. This localized faith helped bind the confederation together but marked it as heretical to orthodox Muslim powers, giving the Almoravids religious as well as political grounds for conquest.
Prayers were recited in Tamazight rather than only in Arabic.
Coastal Berber settlement
Barghawata communities lived on the Chaouia plain and Atlantic coast, where Anfa later became a port noted by Leo Africanus as prosperous because of fertile land. Families combined farming with coastal trade, speaking Tamazight in daily life while using Arabic for religious and commercial purposes. The confederation’s loose council structure meant ordinary people owed allegiance to tribal leaders rather than a distant imperial court.
Anfa was described as the most prosperous city on the Atlantic Coast for its fertile land.
Atlantic coastal exchange
The Barghawata controlled settlements along Morocco’s Atlantic seaboard, including Anfa, which served as a port linking inland Berber producers with maritime traders. Fertile Chaouia plain agriculture supplied food and goods for exchange, while Atlantic access connected the confederation to wider Maghrebi and Mediterranean networks before the Almoravid conquest redirected trade routes.
Anfa’s prosperity rested on fertile land and its Atlantic position.
Structural lenses
Drafted by Beam (lens-v1.1) from the cited sources.
Berber Anfa and the Later Arabization of the Coast
Anfa stood within the Berber kingdom of Barghawata. After the Almoravid defeat of the kingdom, Arab tribes of Hilal and Sulaym descent settled the region, mixed with local Berbers, and contributed to widespread Arabization. This was a later demographic and linguistic shift, not evidence that Barghawata itself was an Arab polity.
Anfa's Fertile Hinterland and Atlantic Fishing Economy
Barghawata prosperity rested on the Chaouia plain's grain harvests and Atlantic fishing, with Anfa serving as the port for surplus produce. Member tribes supplied agricultural and military levies, while the coast between Safi and Salé connected inland fields to maritime exchange. Leo Africanus later called Anfa a great city of Tamasna and the most prosperous city on the Atlantic coast because of its fertile land.
Leo Africanus singled out Anfa as the most prosperous city on the Atlantic coast because of its fertile land.
Salih ibn Tarif's Prophetic Scripture
Barghawata ideology centered on Salih ibn Tarif, who claimed prophethood after Tarif al-Matghari and produced a scripture of eighty surahs. The movement retained Muhammad and the Qur'an while treating Salih as a later prophet, giving the confederation a distinct religious identity separate from its Maliki and Kharijite neighbors.
Salih ibn Tarif's revelation was composed as a scripture of eighty surahs.
Underappreciated & strange truths
In August 1907 the French bombardment and troop landing caused severe damage across the town, while estimates of total dead and wounded run as high as 15,000.
-
Ṣāliḥ ibn Manṣūr, the founder of the Barghawata state, claimed prophetic status and taught a Berber form of Islam, making him one of the few rulers in medieval North Africa to combine political and prophetic authority.
-
The Barghawata capital settlement of Anfa survived the confederation’s conquest and centuries later became Casablanca, Morocco’s largest city.
Follow Greater Casablanca
State ledger
- Lifespan
- 793–1065 CE
- Peak territory
- 38,057 km²
- Languages
- Arabic, Standard Moroccan Tamazight
Connected world
Casablanca's port linked Atlantic wool and tea trade with Britain, French colonial shipping, and the Mohammed V International Airport built on the wartime Berrechid Airfield, while Tangier and Rabat formed its regional rivals along the coast.
Drafted by HY4 Flash (links-v2.0) from the cited sources.
-
The Almoravids conquered the independent Berber kingdom of Barghawata in 1068, ending its rule over Anfa, the prosperous Atlantic port later known as Casablanca.
Drafted by Claude Haiku 5.5 (polity-v1.5) from four cited sources · almanac by Nemotron 3.5 Super VL (almanac-v1.2) · deep lenses by Beam (lens-v1.1), and checked that every citation points to one of them. See the evidence How AI is used
VIIICities & tongues
Mapped cities & trade towns
IXArchives & dossiers
Dossiers across this ground
- Fez & Kairouan: Al-Qarawiyyin, Medicine & Women Patrons (980 CE) · West Asia & N. Africa, 980 CEOpen dossier →
How refugees from Kairouan founded Africa's oldest continuous degree-granting college and paper manuscript hospitals
- Córdoba & Madinat al-Zahra: Libraries & Paper in Al-Andalus (965 CE) · Europe, 965 CEOpen dossier →
Lubna of Córdoba's palace scriptorium, Hasdai ibn Shaprut's multilingual botany, and paper spreading into Western Europe
Primary archive holdings
- North African Qur'an Parchment Folio · 899 CE
Cleveland Museum of Art · 800s · Kairouan / Fez
XCulture & letters
Primary works, letters & books
No matching primary books indexed for this span yet.