Features

7 Things You Might Not Know About Medieval Algeria

From Fibonacci’s mathematical education to Ibn Khaldun’s writings and the great cities of the Maghreb, medieval Algeria played an important role in the history of the Mediterranean world. Sedik Azzouz explores seven fascinating stories that reveal the region’s influence on medieval politics, culture, religion and learning.

By Sedik Azzouz

When people picture the Middle Ages, they often picture castles in France, merchants in Italian cities, or the great courts of Constantinople. North Africa tends to disappear from the picture. That is a shame. Medieval Algeria was home to busy ports, powerful dynasties, religious scholars, and cities that connected the Mediterranean with the Sahara. Some of the people and ideas that emerged from these places would eventually influence societies far beyond North Africa. Here are seven stories that offer a different view of medieval Algeria.

1. Fibonacci Learned About Hindu-Arabic Numerals in Béjaïa

Arabic numbers depicted in the Liber Abaci of Fibonacci –
Biblioteca Apostolica Vaticana, Pal. lat. 1343 fol. 11r

Leonardo of Pisa, better known as Fibonacci, is remembered today for the sequence that bears his name. But many of the mathematical ideas that shaped his career came from beyond Italy.

When Leonardo was young, his father worked as a customs official for Pisan merchants in the North African port of Bugia, now Béjaïa. Leonardo spent part of his childhood there and learned about the Hindu-Arabic numeral system. He continued to encounter and study Arabic commercial arithmetic during later travels around the Mediterranean.

He later described what he had learned in Liber Abaci, which he completed in 1202. The book presented Hindu-Arabic numerals and methods of calculation to European readers and became an important work in the development of Italian commercial mathematics. Roman numerals did not disappear overnight, and Fibonacci was not solely responsible for Europe’s later adoption of the new system. But his book helped bring the mathematical practices he had encountered in North Africa and the wider Mediterranean to a broader European audience. A North African port had become part of the story of one of Europe’s most famous mathematicians.

2. Béjaïa Gave French Its Word for Candle

Béjaïa depicted in a map by Piri Reis – Walters Art Museum MS W.658

Béjaïa left another, much quieter mark on European culture. The city was an important source of beeswax during the Middle Ages, and French merchants associated the wax and candles made from it with Bougie, the French name for Béjaïa. The French word bougie, meaning candle, is derived from the city’s name. The University of Béjaïa dates the appearance of the word in French to the fourteenth century.

The word also entered English, where bougie is used as a medical term for a slender instrument employed in certain procedures. So a medieval Algerian port ended up leaving its name on something as ordinary as a candle—and on a medical term that is still used today.

3. Ibn Khaldun Found Time to Write Away From Court Politics

Bust of Ibn Khaldun in the entrance of the Kasbah of Bejaia, Algeria – photo © Reda Kerbouche, CC-BY-SA, Wikimedia Commons

Ibn Khaldun spent much of his life surrounded by rulers, rivalries, and political upheaval across the Maghreb. In 1375, he withdrew with his family to Qal’at Ibn Salama, a fortress near present-day Frenda in western Algeria. The retreat gave him something that his political career had rarely afforded him: time.

During his stay there, Ibn Khaldun began work on his world history, which became the Kitab al-‘Ibar. He completed the first draft of its famous introduction, the Muqaddimah, in November 1377. He developed ideas about how societies rise and decline, how political power is maintained, and how economic and social forces shape historical events.

Centuries later, scholars would recognize the Muqaddimah as an important precursor to modern historiography and sociology. But its author was writing in relative isolation, far from the courts where much of his earlier career had unfolded. When he eventually returned to Tunis, he needed access to larger libraries to continue revising and expanding his work.

4. Tahert Had an Early Tradition of Electing Its Imam

The Djeddars, early medieval funerary monuments near Tahert in western Algeria, believed to have been built for Berber rulers between the fifth and seventh centuries. Photo by Mus52 / Wikimedia Commons / CC BY-SA 4.0.

In the eighth century, Ibadi Muslims established a state centered on Tahert in what is now western Algeria. The Rustamid dynasty that emerged there became known for trade, scholarship, and its connections across the Sahara. Tahert developed into an important intellectual center, with schools and scholarly circles attracting scholars from different regions and teaching subjects including law, religious studies, language, and philosophy.

Its political system was also distinctive. Rustamid succession involved a consultative selection process rather than simple automatic hereditary succession. When Abd al-Rahman ibn Rustam was nearing the end of his life, he arranged for his successor to be chosen through a shura, or consultative council.

This reflected an important principle in early Ibadi political thought: leadership was supposed to depend on the choice and suitability of the imam rather than automatic hereditary succession. In practice, however, the Rustamid imamate later became increasingly hereditary, and the question of succession remained a source of political tension.

Tahert was also deeply connected to long-distance commerce. It stood at the intersection of routes extending east and west, while the Rustamid state maintained trading links with western Sudan. Merchants from Tahert traveled south across the Sahara, and routes connected the city with places such as Gao and the commercial centers of the western Sudan. The Rustamid state lasted until 909, when it was defeated by the expanding Fatimid movement. Tahert itself did not survive as a major political capital, but its history offers a reminder that medieval North Africa contained a much wider range of political traditions than the familiar European model of hereditary kingship.

5. Qal’at Bani Hammad Was Built as a Capital—and Then Abandoned

The ruins of Qal’at Bani Hammad, the fortified capital of the Hammadid dynasty, founded in 1007 in present-day Algeria. The medieval city is now a UNESCO World Heritage Site. Wikimedia Commons.

In the Hodna Mountains, the ruins of Qal’at Bani Hammad mark the remains of a city that was once the first capital of the Hammadid dynasty. Founded in 1007, the fortified settlement developed into an important political and cultural center. The site included a major mosque, a minaret, palaces, and fortified walls.

The Great Mosque was particularly impressive. UNESCO notes that its prayer hall has 13 aisles and eight bays and describes it as one of the largest mosques in Algeria.

The city was abandoned in 1090 under the threat of a Hilalian invasion. Its fortified remains were later dismantled in 1152, but substantial ruins survived. These surviving remains allow researchers to study the layout and architecture of a medieval fortified Muslim city. Today, Qal’at Bani Hammad is a UNESCO World Heritage site.

6. Sidi Boumediene’s Influence Reached Far Beyond Algeria

Entrance to the Abu Madyan Tomb in Tlemcen. Photo by Riad S. Bereksi / Wikimedia Commons

Abu Madyan, widely known in Algeria as Sidi Boumediene, became one of the important spiritual figures associated with the development of Sufism in the western Islamic world.

He studied and taught in several places before settling in Béjaïa. He later died near Tlemcen in 1198, but his influence did not end with his death. Among those influenced by his teachings was the Andalusian mystic Ibn Arabi. Although the two men never met, Ibn Arabi repeatedly referred to Abu Madyan with great admiration and respect. He even referred to him as the “Master of masters.”

Abu Madyan’s influence continued through later generations of Sufi scholars and teachers across the Maghreb and into the wider Islamic world. His name therefore became connected not only with Tlemcen, but with a much broader spiritual tradition that crossed political and geographic boundaries.

7. The Great Mosque of Tlemcen Has Survived for Centuries

The courtyard and minaret of the Great Mosque of Tlemcen in Algeria. Originally built during the Almoravid period in the late eleventh century, the mosque is one of the country’s most important surviving examples of medieval Islamic architecture. Photo by Dezedien / Wikimedia Commons / CC BY-SA 4.0.

Tlemcen became one of the important cultural centers of the western Maghreb, and one of its most enduring monuments is the Great Mosque. The mosque was established in the late 11th century during the Almoravid period. Later additions and renovations changed parts of the building, but much of its original character remains visible.

The celebrated dome above the mihrab was added during a major renovation completed in 1136 under Ali ibn Yusuf. Its 24 ribs form a twelve-pointed star, while pierced decorative panels allow natural light to enter the space. This combination of geometric design and architectural ingenuity makes the dome one of the mosque’s most distinctive features.

The mosque also reflects the close architectural connections between the Maghreb and al-Andalus. Smarthistory notes that its decoration combined local Maghribi and Andalusi traditions, reflecting the wider reach of the Almoravid Empire. The Great Mosque remains one of the most important surviving examples of Almoravid architecture in Algeria.

The medieval history of Algeria is full of connections that are easy to miss. A merchant in Béjaïa, a scholar in Tlemcen, a ruler in Tahert, or a traveler crossing the Sahara could all be part of networks that reached far beyond the place where they lived.

Those connections are what make these stories worth remembering. Medieval Algeria was not sitting at the edge of the medieval world. It was part of it.

Sedik Azzouz is an Algerian writer interested in medieval North African history, Mediterranean connections, and the overlooked stories that link the region to the wider world.