
Medieval West African Empires · Religion and Belief
Two towns, one ruler
Photograph by Ondrej Havelka, CC BY-SA 4.0, via Wikimedia Commons.
The Archives/Medieval West African Empires/Religion and Belief
The merchants converted first, then the court, then the towns. The countryside took another eight hundred years, and in places it never happened at all.
Al-Bakri, writing in 1068, describes the capital of Ghana as two towns six miles apart. One is Muslim, large, with twelve mosques, salaried imams and muezzins, and jurists and scholars. The other is the royal town, containing the king’s palace and the sacred grove where the religious practitioners live and where the kings are buried.
The king is not a Muslim. His interpreters, his treasurer and the majority of his ministers are. That description, in a single passage, contains the entire dynamic of Islam’s arrival in West Africa, and everything that happened over the following eight centuries is an elaboration of it.
Islam came with trade. It was adopted by merchants, then by courts that needed what the merchants and their literacy could supply, and it spread outwards from there very slowly indeed. Nobody conquered anybody, and the process took a millennium and is not finished.
❦On this page
What was there before
The religion Islam arrived alongside needs describing, because it is usually left as a blank. West African religious systems varied enormously and shared a set of features. A distant creator god, acknowledged and not much addressed directly.

Below that, a populated world: spirits of particular places, rivers, groves, hills and fields, with whom relations had to be maintained. Ancestors, who remain involved in the affairs of their descendants and who require attention. Specialists: diviners, healers, rainmakers, masters of particular knowledge, frequently organised in initiation societies with graded membership.
And a close connection between political authority and ritual function. A ruler’s legitimacy rested partly on his relationship with the land and the ancestors, and his regalia were sacred objects rather than ornaments. Two features of that system made accommodation with Islam straightforward.
It was not exclusive. Adding a powerful new source of blessing to the ones already in use is not a contradiction in a system that does not claim a monopoly, and West African rulers approached Islam that way for centuries. And it was practical. Religious practice existed to secure rain, health, fertility and victory, and a technique that demonstrably worked was worth adopting whatever its origin. Muslim amulets containing written Quranic verses were adopted very early and very widely, by Muslims and non-Muslims alike, and they are still made.
How it arrived
The mechanism was commercial and the chronology can be reconstructed. Muslim merchants were crossing the Sahara from the eighth century, and the trading towns of the desert edge had Muslim populations from early on. Those merchants needed a legal framework, and they brought one: Maliki law, the school dominant in North Africa, with its own jurists, its own courts and its own contractual forms.
They needed literacy, and they had it, in Arabic. And they needed a network of trust across distances, which shared religion supplied, as The merchants who were not Arabs describes. So the first Muslims in the western Sudan were traders, and the first West African Muslims were the local traders who joined the network.
Conversion of rulers follows. Al-Bakri records the ruler of Takrur on the Senegal accepting Islam around 1040, and the ruler of Gao described as Muslim by the eleventh century. Ghana’s ruling group appears to have converted around 1076, and Mali’s kings were Muslim from Sundiata’s period or shortly after.
What a ruler got from it
The incentives are worth setting out, because they are practical rather than spiritual and the sources make no secret of them. Literacy. A Muslim court acquires secretaries who can write, keep accounts, draft correspondence and maintain records, which no oral administration can match.

Law. Islamic commercial law supplies a framework for adjudicating between merchants that both parties accept, which makes a ruler’s markets attractive. Diplomacy. A Muslim ruler can correspond with Cairo, Fez and Granada, receive their envoys, and be recognised as a legitimate sovereign by them.
Legitimacy of a new kind. The pilgrimage, described in The pilgrimage as foreign policy, converts a regional king into a figure known in the wider Muslim world. And access. Merchants preferred to deal with rulers who shared their law and their language, and a Muslim court got better terms.
None of that requires insincerity, and there is no reason to assume these rulers were cynical. It does explain why conversion moved from the top down through the commercial and political classes long before it reached the villages.
What a ruler did not give up
The other half is the part that later reformers objected to for eight hundred years. A West African ruler’s authority in the countryside rested on a religious position that predated Islam: descent from ancestors, relationships with spirits of land and water, custody of shrines and ritual objects, and the ability to secure rain and harvest. Abandoning that meant abandoning the basis on which the non-Muslim majority accepted his rule.
So rulers did both. They prayed, built mosques, endowed scholars and made the pilgrimage, and they also maintained the shrines, consulted diviners, observed the ancestral rites and preserved the regalia. Al-Bakri’s two towns are that arrangement made physical. The Muslim town has the mosques; the royal town has the grove.
Ibn Battuta saw the same thing at Mali’s court in 1352, where a devoutly Muslim ruler was preceded by masked performers in feathered costumes that Ibn Battuta identified as pre-Islamic and disapproved of. The term usually applied to this is mixing, and it has been a term of criticism since the eleventh century and a description of practice for just as long.
Writing as power
One aspect of the encounter deserves separating out, because it explains the speed of the early adoption. Into a society with no writing came a religion whose sacred text was a book, whose law required documents, and whose practitioners could make marks that carried meaning across distance and time. That was not experienced as a technology. It was experienced as a capacity, and it was assimilated to the existing category of specialist knowledge.
The consequence is visible everywhere. Quranic verses written on paper or on a board, washed off and the water drunk, are a standard West African remedy and have been for centuries. Amulets containing written text, sewn into leather, were worn by Muslims, by non-Muslim rulers and by warriors of every description, and Portuguese and later European observers describe African soldiers covered in them.
The men who made them, the marabouts, occupied a position recognisably similar to the existing religious specialists: possessors of dangerous knowledge, consulted for practical purposes, paid for results. That is one of the clearest cases anywhere of a new religion being adopted through an existing social category rather than replacing it, and it is why the early spread ran through the courts and the merchants so quickly while the underlying religious world changed so slowly.
The scholars' complaint
The reforming critique is documented and it recurs with remarkable consistency. Al-Maghili, a North African jurist, corresponded with Askia Muhammad of Songhai in the 1490s and supplied written answers to his questions. His position was uncompromising. A ruler who permits practices contrary to the law is not properly Muslim; those who mix Islam with other observances are unbelievers; and jihad against them is lawful.

Askia Muhammad used those rulings, and campaigned against the Mossi on the strength of them. The same argument appears in the Timbuktu chronicles’ treatment of Sunni Ali, described in Provinces, governors and a standing fleet: a ruler who prayed and also consulted diviners, whom the scholars condemned as an unbeliever. And it appears again, with enormous consequences, in the nineteenth century, when Usman dan Fodio launched the jihad that created the Sokoto Caliphate on exactly this basis: that the Hausa rulers were nominal Muslims permitting unbelief, and were therefore lawful targets.
That is an eight-hundred-year continuity of argument, and it indicates that the accommodation al-Bakri described was never accepted by everybody and was never abandoned either.
The scholars' alternative
The other tradition is less famous and was probably more influential. A strand of West African scholarship argued for accommodation rather than confrontation: that a Muslim minority under a non-Muslim ruler should observe its own religion, avoid politics, teach, and wait. Al-Hajj Salim Suwari, a Soninke jurist of the fifteenth century, is the figure associated with it, and the position is known as the Suwarian tradition.
Its principles: unbelief arises from ignorance rather than malice; God will bring people to Islam in His own time; Muslims should not compel; and a Muslim may live under a non-Muslim ruler provided he can practise. That doctrine is what made the Dyula commercial diaspora possible. A trading community living among non-Muslim hosts, dependent on their goodwill, needs a theology that permits it, and this one did.
It is also, on any reckoning, the position that actually governed West African Islam for most of its history, and the reforming jihads are the exception rather than the rule.
The long spread
The chronology of actual conversion is slow and the pattern is consistent. Merchants and courts by the eleventh to fourteenth centuries. The towns over the following centuries, as trade drew populations in and as scholarly institutions established themselves.

The countryside much later, and in many areas only in the nineteenth and twentieth centuries. Several factors accelerated the late phase: the jihad states of the eighteenth and nineteenth centuries, which converted by force in places; the Sufi orders, particularly the Qadiriyya and the Tijaniyya, which spread through rural areas in a way the urban jurists never had; and, paradoxically, colonial rule, which improved communications, undermined the authority of local religious practice, and in French West Africa frequently favoured Muslim intermediaries.
The result is that West Africa is today overwhelmingly Muslim in the Sahel and savanna, mixed further south, and predominantly Christian or traditional in the forest zone. That distribution follows the trade routes and the ecological bands, which is what one would expect of a religion that arrived by commerce.
Women again
One consequence deserves noting because it is visible across the whole period. The social forms that came with Islam were adopted selectively, and the position of women is the clearest case. Ibn Battuta’s shock at Mali in 1352, described in What Ibn Battuta noticed, is the earliest documentation.
Matrilineal descent, reported by al-Bakri for Ghana and by Ibn Battuta for the Massufa, continued in Muslim communities that had adopted Islamic law in commercial matters. Unveiled women, women in public life, and women holding property in ways Maliki law did not contemplate are reported repeatedly by outside observers across five centuries, always with disapproval. That is a society taking the law, the literacy and the network and declining the domestic arrangements, sustained across a very long period against sustained criticism.
What to call it
A closing note on terminology, because the words used here matter. Older writing describes West African Islam as syncretic, mixed or superficial, and treats the reforming jurists’ view as the correct one. That imports the polemic. Al-Maghili had a position and it was a minority one, and adopting his standard means describing eight centuries of West African religious life as a failure to be properly Muslim.
The alternative, now general in the scholarship, is to treat what happened in West Africa as one of the ways Islam exists, alongside the ways it exists in Indonesia, in Bosnia and in Morocco, each of them the product of a local history. On that reading al-Bakri’s two towns are not a halfway house. They are a working arrangement that a ruler with two constituencies devised, that lasted centuries, and that produced Timbuktu.
Sources
Ancient
- Al-Bakri, 1068, on Ghana; Ibn Battuta, Rihla, on Mali
- The responses of al-Maghili to Askia Muhammad; the Tarikh al-Sudan
- The writings associated with al-Hajj Salim Suwari and the Suwarian tradition
Modern
- Nehemia Levtzion, on Islam and state formation in West Africa
- Nehemia Levtzion and Randall Pouwels, editors, The History of Islam in Africa, 2000
- Ivor Wilks, on the Suwarian tradition and Dyula Islam
- John Hunwick, Timbuktu and the Songhay Empire, 1999
- Rudolph Ware, The Walking Qur’an, 2014
New civilisations are announced by email as they are written.
Passages may be quoted with my name and a link to the page, and copies may be handed out in a classroom, lecture or study group as long as the site’s name stays on them. Please ask first before republishing a whole essay or Archives page, translating one, or using the writing in anything that is sold. Use for training machine-learning systems is not permitted. The details are on Using this site.
Images are credited individually; rights remain with their holders.