Islam in Africa and the Corsair Kingdom: Morocco, Tlemcen, Algiers and Barbarossa

The reach of African Islam from Timbuktu to Morocco, the cities of Fez and Tlemcen, the rise of Algiers as a corsair base, and the career of Khayr al-Din Barbarossa, who brought the Maghreb under the Ottomans and shook the Christian Mediterranean.

BarbarossaIslamic AfricaOttoman Algiers

~9 min read · Updated Oct 31, 2026

Islam's Long Superiority

For those of us confined within the molds of Christianity, it is hard to accept that from the eighth to the thirteenth century Islam surpassed Europe culturally, politically and militarily. Even in the sixteenth century, when its decline had begun, the realm of Islam stretched from beyond Delhi to Casablanca, from Edirne to Aden and from Tunis to Timbuktu.

Ibn Battuta, who visited the Sudan in 1353, found it under Muslim rule with a respectable civilization. Abd al-Rahman al-Sadi, a black Muslim, in his instructive and careful Tarikh al-Sudan (1650), tells of Timbuktu's private libraries, which held nearly 1,600 volumes, and of great mosques whose ruins bear witness to the age of greatness of that region.

Morocco: Fez and the Marinids

The Marinid dynasty made Morocco independent and turned Fez and Marrakesh into important centers with lofty gates, great mosques, respected libraries, schools with shaded colonnades and bazaars full of talk where everything could be bought at half price. In the thirteenth century Fez had 125,000 inhabitants, probably making it more populous than any European city except Constantinople, Rome and Paris. At the Qarawiyyin mosque, seat of Morocco's oldest schools, religion and learning grew side by side, and eager students from all over Islamic Africa gathered to complete demanding courses of three to twelve years, emerging as teachers, jurists, theologians and statesmen.

Emir Yaqub II, who ruled the two cities and the country (1269–1286), was one of the most enlightened rulers of that progressive century. A just ruler and prudent humanitarian, he tempered theology with philosophy, avoided fanaticism and kept friendly relations with Europeans. The two cities took in Spanish refugees who warmed the market for science, art and industry. Ibn Battuta, who had seen nearly every part of Islam, called Morocco an earthly paradise.

Tlemcen

A modern traveler arriving at Tlemcen on the road from Fez to Oran is amazed to see how little remains of a city that held 125,000 people in the thirteenth century. Of its sixty-four mosques, three, the Great Mosque (1136), the Abu al-Hasan Mosque (1298) and the Halwiyya Mosque (1353), count among the finest works of Islamic architecture. Marble columns, mosaic tilework, mihrabs brilliant in transparent colors, arcaded courtyards, carved wood and soaring minarets still survive to speak of a lost and nearly forgotten splendor.

In this city the Abd al-Wadid dynasty ruled for three centuries (1248–1553, with an interruption), with a relatively enlightened and prudent government that granted Christians and Jews religious freedom and encouraged literature and art. After the Ottoman Turks took Tlemcen (1553), the city lost its importance as a trade center and sank into the darkness of history.

Algiers and the Corsairs

A little to the east, the city of Algiers had grown rich and prosperous on a mixture of commerce and piracy. This spectacular port, half hidden by cliffs on a crescent bay, was made of white houses and palaces rising tier on tier from the Mediterranean shore up to the casbah. These features made Algiers a good refuge for armed private ships. In fact since the days of Pompey the pirates of those coasts had plundered the defenseless trade of the Mediterranean.

From 1492 on, the port of Algiers became a refuge for Moors fleeing Spain. Many of them joined bands of corsairs to quench their thirst for revenge by attacking Christian merchant ships. As their numbers and boldness grew, they built a great fleet in the manner of powerful nations and plundered the northern Mediterranean coasts. The Spanish government retaliated and sent its navy to defend its merchant ships, and in a series of attacks took Oran, Algiers and Tripoli (1509 and 1510).

Barbarossa

In 1516 a new corsair appeared on the scene. Italians called him Barbarossa for his red beard. His real name was Khayr al-Din, and he came from Lesbos in Greece. With his brother Oruc he joined a band of pirates. While Khayr al-Din was trying to reach command of the corsair fleet, Oruc attacked Algiers with an army, drove out the Spanish garrison, became ruler of the city and then died in battle (1518).

Khayr al-Din succeeded his brother and took command with competence and strength. To secure his position he went to Constantinople and submitted to Sultan Selim I, offering him the rule of Tripoli, Tunis and Algiers on condition that the sultan support him with enough troops and appoint him to govern them. Selim agreed, and his successor, Suleiman the Magnificent, carried out the arrangement.

The book says that in 1553 Khayr al-Din, with his ships, rescued 70,000 Moors from inhospitable Spain and carried them to Africa, becoming the hero of Western Islam. When he was made admiral of the Turkish navy, he attacked the coastal towns of Sicily and Italy one after another with eighty-four warships and took thousands of Christians captive. When he landed near Naples, he nearly captured Giulia Gonzaga Colonna, then known as the most beautiful woman in Italy, but she escaped, rode off half-dressed on a horse with the one knight who stayed with her, and later, for reasons left unsaid, had that knight killed. This last detail is omitted here.

The Conquest of Tunis, 1534–1535

But Khayr al-Din was after more lasting prizes than a beautiful woman. In 1534 he landed his Janissary force at Bizerte and marched on Tunis. The Hafsid dynasty had ruled that city wisely since 1036, and under the protection and encouragement of its emirs, literature and art had flourished. But the current emir, Mulay Hasan, had alienated and frightened his people with his injustice. As Khayr al-Din approached, he fled Tunis, and the city surrendered without resistance or bloodshed. Tunisia was added to the Ottoman realm, and Khayr al-Din held the Mediterranean in his grip.

Once again a crisis arose in Christendom, since the Ottoman fleet, facing no strong opposition, might at any moment look at the boot of Italy to gain a foothold for Islam. By chance, Francis I had made an alliance with the Turks at that time, and Pope Clement VII was allied with France. Fortunately Clement died (25 September 1534), and his successor Paul III asked Charles V for help in crushing Barbarossa. Andrea Doria also placed the whole Genoese navy at the pope's service.

In spring 1535 Charles assembled 400 warships and 30,000 soldiers at Cagliari in Sardinia, crossed the Mediterranean and besieged La Goletta, a strong fortress overlooking the Gulf of Tunis. After a month of fighting La Goletta fell and the Spanish troops marched on Tunis. Khayr al-Din tried to stop them but was defeated and fled. Christian slaves in Tunis broke their chains and opened the gates. Charles entered the city without resistance and, to keep his soldiers from mutiny, gave it up to them for two days. Thousands of Muslims were killed, and the fruit of centuries of art was lost in a day or two. Christian slaves were freed with joy, and the remaining Muslim inhabitants were enslaved. Charles V restored Mulay Hasan to power as his client, left garrisons at Bone and La Goletta and returned to Europe.

The Sea War Resumes

Khayr al-Din fled to Constantinople and with the financial help of Suleiman the Magnificent fitted out 200 new warships. In July 1537 this force landed at Taranto, and Christendom was again threatened with encirclement. The Venetian state, the papal court and the Spanish empire formed a new "Holy League" and 200 ships were fitted out near Corfu. On 27 September the two fleets met at the mouth of the Gulf of Arta, almost where Mark Antony and Cleopatra had faced Octavian at Actium. Khayr al-Din won and again took command of the seas. He then moved east and took the Venetian possessions in the Aegean and on the Greek coast one by one, forcing Venice to accept his separate offer of peace.

Charles tried to win Khayr al-Din with gifts and the promise of rule over North Africa, but he preferred the Islamic flavor. In October 1541 Charles and Doria sent an army to Algiers. It was beaten on land by Khayr al-Din's troops and at sea by a storm. Khayr al-Din repaid the attempt by plundering a town in Calabria and landing at Ostia, the gateway of Rome. The great capital trembled at its shrines, but at that time Pope Paul III was on friendly terms with Francis I, and Khayr al-Din, apparently out of respect for France, his ally, paid cash for the damage at Ostia and left in peace.

He then sailed to Toulon with his fleet and was welcomed by the trusting French. He asked them to stop ringing bells while his fleet was in port, since the sound disturbed his sleep, and the request became general law. With French naval support he went to war against Spain so that Nice and Villefranche could be wrested from the Spanish empire and joined to France. At seventy-seven the victorious corsair retired with full ceremony, to die in his bed at eighty (1546).

The Ottoman Maghreb

The towns of Bone and La Goletta and Tripoli were restored to Islam, and the Ottoman empire extended from Algiers to Baghdad. Only one other Muslim state dared to deny that empire's mastery of the Islamic world.

Written & researched by Dr. Shahin Siami

Related Articles

Habsburg and Valois, 1515–1526: Marignano, Pavia and the Treaty of Madrid

Durant on Francis I's victory at Marignano, his defeat in the imperial election of 1519, the treason of the Constable of Bourbon, the disaster at Pavia, the king's captivity in Madrid, Louise of Savoy's diplomacy, and the treaty Francis signed without meaning to keep.

Continue

The Protestants of France: Reform, Placards and Persecution under Francis I

Durant on the French Church before the Reformation, the Concordat of 1516 that nationalized it, Lefèvre d'Étaples and the Meaux circle, the first martyrs, the Affair of the Placards, Francis's shifting policy, and the massacre of the Waldensians that stained the end of his reign.

Continue

Marguerite of Navarre: The Pearl of the Valois, Patron of the Renaissance and Reform

Durant on Marguerite of Navarre, sister of Francis I: her devotion to her brother, her two marriages and her daughter Jeanne d'Albret, her charity and patronage of writers and reformers, the Heptameron and its world of courtly love, and her vague, tolerant faith that briefly joined Renaissance and Reformation.

Continue

Francis I and the France of 1515: The "Big-Nosed King," His Court and His Kingdom

Durant on Francis I of France: his birth, upbringing and marriage, his character as a chivalrous patron of the Renaissance, and the France he inherited in 1515, with its prosperous peasantry, its classes, councils, parlements and venal offices, and its extravagant, woman-ruled court.

Continue

Calvin's Last Years, 1554–1564: Anti-Trinitarians, Death and Legacy

Durant on Calvin's final decade: his fear of Unitarianism and the fate of Gribaldi, Blandrata and Gentile, his illness and death in 1564, the spread of Calvinism beyond Geneva, its influence on democracy, and how its harsher doctrines faded.

Continue

The Cry for Tolerance: Servetus's Execution, Calvin's Defense and Castellio's Reply

Durant on the reaction to the burning of Servetus: Catholic and Protestant approval, Calvin's 1554 treatise justifying the punishment of heretics, Sebastian Castellio's anonymous plea for religious tolerance, Beza's answer, and Castellio's later writings and death in poverty.

Continue