Ibn Khaldun: Ruthless Politician, Daring Intellectual, Hard on Corruption, Sufi Champion

Currently I am working on a book about Ibn Khaldun, Machiavelli, and Carl Schmitt. Periodically, I will be posting updates on the research I have done. In this blog post, I give some biographical details of Ibn Khaldun (1332-1406) and subsequently intend to post more blogs about my research on him.


Ibn Khaldun was one of the greatest thinkers of all time and is especially celebrated for inventing the sciences of historiography and sociology centuries before these methods of investigation were conceived of in the West. Unusually for an individual of his time, he left us a detailed autobiography. A well-known translator of Ibn Khaldun, Rosenthal, suggests that it is accurate and reliable on a number of grounds. Rosenthal refers specifically to the detail, citing of evidence, frankness of the autobiography, as well as verification of episodes by other sources, as proof for his view. Thus we can be confident that Ibn Khaldun did not merely write a hagiographical tome for posterity. At the same time, he did not provide later historians with a great deal of material concerning his family or social life, material that could be used to construct a psychological picture of the man. Omitting this material was not unusual for the time.[1]

1. Early Life

The great historian was born on Ramadhan 1, 1332 in Tunis to one of the noble families of the Maghreb (Western) region, i.e. the area covering North-West Africa and Andalusia. As we shall see, he did not find peace in the Western part of the Muslim world, but he always took pride in his origins and held high affection Muslim Spain, where he had many family roots.

Statue of Ibn Khaldun in Tunisia

He had four siblings and Ibn Khaldun’s father – who was a jurist, philologist, and poet – died in 1349 from the plague. Father passed on much of his knowledge to son. Ibn Khalduns environment also assisted his education and Tunis was an intellectual hub of North Africa at the time. On the one hand, he studied the religious law, Prophetic traditions, Quran exegesis and, on the other hand, studied subjects like philosophy and logic (subjects termed in Arabic ‘ulum ‘aqliyya, or intellectual sciences). Ibn Khaldun’s studies were under the great philosopher Abilyy. He belonged to the Maliki school of jurisprudence,[2] one of the four great schools of law in Islam.[3]

2. Political Career in the Maghreb

When he was almost twenty, Ibn Khaldun became Seal Bearer (Sahib al-‘alama)[4] at the court of the ruler in Tunis, the Hafsid Muhammad ibn Tafrakin, in 1350. This was an important position despite its seeming triviality. Essentially, his appointment meant that he could act as an adviser and it also gave him access to political circles.

At the time, North Africa, and what remained of Muslim Spain, was a hotbed of intrigue, deceit, and power struggles. Simultaneously, the Maghreb played host to a glittering and diverse cultural scene. In many ways the Renaissance in Italy somewhat mirrored this period in Western Islamic history although the Maghreb was not hitting the heights of earlier centuries, as opposed to the Italy of the time which was beginning to flower culturally.

After only two years in Tunis, Ibn Khaldun used the opportunity of a war between the Emir of Constantine, another Hafsid ruler, and Tafrakin, to emigrate to Morocco and the court of the Merinids. This emigration took him about another two years because of the need to politick and manoeuvre in the midst of turmoil. When he got to Fez in the year 1354, he started his career there on the Council of ‘Ulama (scholars), then got promoted, but ultimately only reluctantly accepted an official post offered him by Sultan Abu Enan. Nonetheless, Ibn Khaldun continued his studies and participated in the intellectual life of Fez. By this time, Ibn Khaldun was a celebrated scholar in one of the great cities of the Islamic world. However, he was neither an original thinker nor someone who made a valuable contribution to the existing sciences.[5]


Not only was Ibn Khaldun an erudite scholar, but he was also a cunning political operator who lacked any sense of sentiment. While in Fez, he found himself imprisoned. There are two versions of what happened given by Enan, on the one hand, and Rosenthal and Mahdi, on the other. Both stories involved a Hafsid ruler of Tunis, the Emir of Bougie (modern day Béjaïa in Algeria) who was either captive (Enan) or merely based in Fez (Rosenthal and Mahdi). Either he attempted to spring the Hafsid Emir free or merely conspired with him against Sultan Abu Enan. Whatever the truth of the matter, he found himself imprisoned when word of the supposed conspiracy came to the attention of Abu Enan in 1357.

After nearly two years in prison, Sultan Abu Enan approved his release after Ibn Khaldun wrote him a poem. He was freed in 1358, although the prison door was opened by the Sultan’s Vizier because the Sultan had died while abroad. Once more, Ibn Khaldun refused to let an opportunity for advancement go by, regardless of past favours. By 1360, he was the secretary of a new ruler of Fez, Abu Salem, whom he had helped to power by deposing the Sultan Abu Enan’s Vizier and the Vizier’s son, the latter the puppet ruler of Morocco for a time.[6]

Under Abu Salem, Ibn Khaldun rose to be either Chief Justice (Enan) or what was called a mazalim (Rosenthal), the latter a lower-ranking judicial position than the Chief Justice. A mazalim adjudicated on legal matters outside the scope of the religious law. However, ever the opportunist, Ibn Khaldun sought favour with new revolutionary forces led by Omar ibn Abdullah in 1361. Unfortunately for Ibn Khaldun, his ambitious reputation preceded him and he only received a minor post after the successful prosecution of the revolution because the new ruler feared him.

Expressing his dissatisfaction, Ibn Khaldun sought leave to go to Tunis but was initially prevented by the new ruler. With some strings attached, he was eventually allowed travel but he was compelled to go to Spain rather than Tunis. At the end of December, 1362, Ibn Khaldun arrived in Granada and joined the inner circle of the Sultan of that fabled city of Muslim Spain, which was ruled by the Banu-al-Ahmar (Nasrid) house. By this time, Granada was merely a great cultural centre and not a bastion of political power. It had to tread a fine line between the Christian kingdoms to the North and the Moroccan Sultanate to the South, allying and playing the role of enemy as much as it was expedient to survive.[7]

Ibn Khaldun was sent as an envoy to the Christian ruler of Castille, Pedro the Cruel, in 1364. This was the only contact Ibn Khaldun had with the Christian world and he at least exhibited some scruples (or perhaps it was prudence) as he refused an offer to join the inner circle of the Spanish tyrant. At the Granadan court, Ibn Khaldun appeared to have been outmanoeuvred by a fellow scholar-courtier Ibn al-Khatib.[8] In the meantime, the friend he had once helped out of jail, the Emir of Bougie, had regained his throne and he invited Ibn Khaldun to join him in a ministerial role. He arrived in modern-day Algeria greeted by a tumultuous crowd and essentially became the prime minister of Bougie in 1365.[9] Enan tells us the following about Ibn Khaldun:

He assumed absolute power and managed all affairs vigorously, calming dissension skilfully and wisely, and going about the mountain tribes collecting taxes by the force of his sagacity and influence.[10]

Only about a year after arriving, the Emir was killed in a battle with Abul Abbas, the Emir of Constantine (Algeria). Ever the hard-nosed pragmatist, Ibn Khaldun refused to shore up the power base of the harsh rule of the deceased Emir of Bougie and instead cast in his lot with the new order. Yet, after another short period of time, he found himself out of favour with the new ruler. Ibn Khaldun then fled to Biskra (Algeria). In his absence, his property was confiscated and his brother arrested. Another ruler, the Sultan of Tlemcen (Algeria), who belonged to the ‘Abd-al-Wadid house (also known as the Ziyanids), sought Ibn Khaldun’s skills in both a ministerial and propaganda role. Ibn Khaldun declined the former but accepted the latter. At Ibn Khaldun’s instigation, the tribes switched their allegiance from the new ruler of Bougie to Ibn Khaldun’s new protector, Abu Hamu, and Ibn Khaldun made overtures to the ruler of Tunis. Despite the efforts of Ibn Khaldun, the Sultan of Tlemcen was unable to overcome his enemy.[11]

After only about another year of taking up new employment, the ruler of Tlemcen came under assault from the Moroccan Sultan. Ibn Khaldun asked to leave Tlemcen to go to Granada. He reached the port of Hanin but was arrested by Moroccan soldiers. Ibn Khaldun had to explain his previous treacherous behaviour and this explanation secured his safety. After a somewhat long retreat, Ibn Khaldun once more found himself fulfilling a propaganda role on behalf of the Sultan of Morocco, Abd-al-Aziz, but this time directed against his old employer Abu Hamu. This was around 1371.

Following the Moroccan ruler’s successful prosecution of his campaign, Ibn Khaldun failed initially in a propaganda campaign to secure the tribes in Middle Barbary to the Sultan’s cause. About this time, his old adversary Ibn al-Khatib came to Tlemcen, as he had fallen out of favour in Granada. Meantime, tribal insurrection raged in Middle Barbary but Ibn Khaldun managed this time to quell it through propaganda. However, during a period of political turmoil following the death of Abd-Al-Aziz, Abu Hamu retook Tlemcen and nearly captured Ibn Khaldun. Ibn Khaldun made it to Fez and was received by the de facto ruler, the Vizier Ibn Ghazi. While in Fez, a war broke out between Granada and the Moroccan kingdom, which ended in the defeat of the latter. Ibn Khaldun was nearly held captive but a puppet ruler in North Morocco interceded on his behalf. In the ensuing melee, however, Ibn Khaldun’s friend Ibn al-Khatib was captured and strangled. This was in 1374.[12]

3. Literary Masterpiece and Flight to Egypt

Arabic version of Al-Muqaddimah. Image courtesy of muslimheritage.com.

Ibn Khaldun once more ended up at the court of Abu Hamu in 1374, albeit because he had no place else to turn. This time, he shied away from political matters and went into retreat into a castle near Oran in modern-day Algeria, and it is here where his historical masterpiece took shape. Over the next four years he began work on his Prolegomena and his History, which come down to us in Al-Muqadimmah and the Kitab al ‘Ibar.[13]

Ibn Khaldun then went to settle down once more in Tunis, a place which he had frequented in over 25 years. Despite attempting to remain apolitical and settle into a teaching role, Ibn Khaldun’s closeness to the Sultan drew him powerful enemies. Nevertheless, he continued working on his masterpiece and after about four years in Tunis had completed his literary gem. Caught between the Sultan’s expeditions and political battles at court, Ibn Khaldun finally left the Maghreb, never to return, in 1382, on the pretext of performing the Hajj.[14]

4. Egypt

In 1382, Ibn Khaldun arrived in Alexandria and despite genuinely intending to perform Hajj (although this was not his real reason for leaving Tunis) was unable to perform his pilgrimage at this juncture. However, he did go to Cairo, which was far bigger than any cities in the Maghreb. He was greeted as a celebrity and lectured in the renowned Al-Azhar university on subjects such as jurisprudence and on his own studies into matters such as the rise and fall of civilizations. Mahdi tells us that he revised his masterpiece based on the knowledge he obtained while in Egypt.[15]

Once more, he was taken under the wing of a ruler, this time Al-Malik Al-Zahir, but the political situation was far more stable in Egypt than in the Islamic West. In 1384 he gave lectures at three prestigious colleges, obtained a professorship, and he filled the position of Maliki Chief Justice. In Egypt, he became wealthy from his various professions.

While he was a ruthless political operator, Ibn Khaldun adopted a principled stance on legal matters. It should be borne in mind that although he was a Machiavellian in politics, he was also a religious person[16], and was of the conviction that legal matters had to be approached in a pious manner. He seems to have compartmentalized his political existence – which is an essentially lawless, albeit not unprincipled, domain[17] – and his legal existence, where there was a wealth of guidance from the Quran and Sunnah. Also, he appears to have reached the conclusion that the scholars and legal practitioners were the best means for reforming Islamic polities, as opposed to a wise ruler or the mechanics of politics. Ironically, his virtue and ethical behaviour in dealing with corruption, improving professional competency, and running a legal apparatus in a highly professional manner, not to mention his refusal to shirk from imposing just sentences no matter who the condemned party was, stirred up enmity amongst other acolytes of the Sultan. As a result of his scrupulous conduct, Ibn Khaldun was either relieved of his prestigious post, or tendered his resignation, after about a year of being appointed. He yet remained a favourite of the Sultan. During this time, his entire family, wife and children – who had been held as hostages in case Ibn Khaldun had sought to help enemies of the Tunis ruler – also died at sea when they were released to join him from Tunis. Not long after this catastrophe, he finally performed the Hajj and returned to teach Maliki jurisprudence.[18]

Map of Ibn Khalduns travels. From muslimheritage.com

Ibn Khaldun was appointed head of a major Sufi Institute in Egypt in 1389. That year, there was a coup carried out against the Sultan of Egypt which the ruler took a year to resolve in his favour. Ibn Khalduns life was destabilized by the events and he only returned to his former sedate existence when Al-Zahir regained power. The relationship between the two men was somewhat strained as Ibn Khaldun had given a legal opinion against Al-Zahir during the coup, but he seems to have been able to convince the ruler that it was only done under duress.

Ibn Khaldun then seems to have largely stayed out of politics, apart from engaging in some diplomatic work on behalf of the Egyptian Mamluks and the Berbers of North Africa. He regained his old post of Chief Justice in 1398, because his old adversaries had lost sway at court. However, his appointment rekindled the fire of his enemies and he only lasted about a year and a half in the post before being relieved of his duties once more.

In 1401, he had a famous meeting with the Mongol warlord Timurlane, where Ibn Khaldun played the role of pacifier (possibly with another judge) when the great Khan was outside the walls of Damascus. Despite having a lengthy conversation with the brutal conqueror, Ibn Khaldun’s intercession was of no avail and the city was sacked. This then meant that Ibn Khaldun had to turn negotiator with Timurlane, as he tried to secure safe passage for himself and other officials back to Cairo. He was successful in this venture. Yet, he fell prey to thieves on the way to Cairo but it was an encounter which Ibn Khaldun survived.[19]

In 1401, Ibn Khaldun was once more appointed Chief Justice in Cairo. One must greatly admire Ibn Khaldun because, in spite of his ability to politick, his ambitious streak, and his experience of Egyptian politics, he refused to veer from executing justice in a considered and pious manner. He well understood the risks of such an approach and after only about a year, he was dismissed and was also summoned to the Hajib (the equivalent of a prime minister) to explain his conduct. His rival for the post of Chief Justice, al Busati, was then dismissed after only 3 months, with Ibn Khaldun once more taking up the coveted position. He lasted in the Justiceship for just over a year, was dismissed, replaced by al-Busati, and then reappointed in 1405. This time he only lasted three months, and there followed a merry-go-round where no less than three justices were appointed. Ibn Khaldun took up the post for the sixth time in 1406, but died a few weeks later. He was seventy-eight years old and was buried in a Sufi cemetery.[20]

My next post is on the dissemination of Ibn Khalduns thought throughout the Muslim and Western worlds. Any suggestions or corrections to this blog post are welcome.


[1] Ibn Khaldun,  A. A-R. b. M. (Rosenthal, F.; Trans.) (1958). The Muqaddimah [pdf version]. Retrieved from http://scribd.com; pp. 825-826.

[2] Considerable information is given on the foundation, suppression, resurrection, and subsequent evolution of the Maliki school of jurisprudence in: Mahdi, M. (1957). Ibn Khaldun’s Philosophy of History: A Study in the Philosophic Foundation of the Science of Culture. Chicago: The University of Chicago Press; pp. 29-32.

[3] Ibid. p. 28, pp. 34-37; Enan, M.A. (1941). Ibn Khaldun: His Life and Work. Kashmiri Bazar, Lahore: Shaikh Muhammad Ashraf; pp. 3-10; Ibn Khaldun,  A. A-R. b. M. The Muqaddimah; pP. 826-831.

[4] Enan tells us this post involved affixing the ruler’s official seal to public pronouncements and documents. Enan, M.A. Ibn Khaldun: His Life and Work; p. 11.

[5] Ibid. pp. 11-20. Ibn Khaldun,  A. A-R. b. M. The Muqaddimah; pp. 831-834.

[6] Enan, M.A. Ibn Khaldun: His Life and Work; pp. 20-26; Ibn Khaldun,  A. A-R. b. M. The Muqaddimah; p. 834. Mahdi, M. Ibn Khaldun’s Philosophy of History; p. 38.

[7] Mahdi, M. Ibn Khaldun’s Philosophy of History; p. 24; Mahdi, M. Ibn Khaldun’s Philosophy of History; pp. 38-41.

[8] The two men were bitter political rivals but had healthy respect for one another as individuals and as intellectuals. Mahdi, M. Ibn Khaldun’s Philosophy of History; pp. 42-43.

[9] Enan, M.A. Ibn Khaldun: His Life and Work; pp. 27-42; Ibn Khaldun,  A. A-R. b. M. The Muqaddimah; p. 834. Mahdi, M. Ibn Khaldun’s Philosophy of History; pp. 835-836.

[10] Enan, M.A. Ibn Khaldun: His Life and Work; pp. 42-43.

[11] Ibid. pp. 44-47.

[12] Ibid. pp. 47-55; Ibn Khaldun,  A. A-R. b. M. The Muqaddimah; p. 836-837.

[13] Enan, M.A. Ibn Khaldun: His Life and Work; pp. 56-60; Gierer, A. (2001). Ibn Khaldun on Solidarity (“Asabiyah”) – Modern Science on Cooperativeness and Empathy: a Comparison. Philosophia Naturalis, 38, 91-104.

[14] Enan, M.A. Ibn Khaldun: His Life and Work; pp. 56-64. Ibn Khaldun,  A. A-R. b. M. The Muqaddimah; pp. 839-840; Mahdi, M. Ibn Khaldun’s Philosophy of History; p. 52.

[15] Mahdi, M. Ibn Khaldun’s Philosophy of History; p. 54.

[16] Islam, J. (2016). Contrasting Political Theory in the East and West: Ibn Khaldun versus Hobbes and Locke. International Journal of Political Theory, 1(1), 2371-3321.

[17] “[T]he Qurʾan does not contain prescriptions for any speciic political system, but rather emphasizes only general principles (such as justice, consultation, and preventing oppression).” Ardiç, N. (2012). Genealogy or Asabiyya? Ibn Khaldun between Arab Nationalism and the Ottoman Caliphate. Journal of Near Eastern Studies, 71(2), 315-324.

[18] Enan, M.A. Ibn Khaldun: His Life and Work; pp. 70-81. Ibn Khaldun,  A. A-R. b. M. The Muqaddimah; pp. 840-843. Mahdi, M. Ibn Khaldun’s Philosophy of History; pp. 53-57.

[19] Enan, M.A. Ibn Khaldun: His Life and Work; pp. 82-95. Ibn Khaldun,  A. A-R. b. M. The Muqaddimah; pp. 843-844. Mahdi, M. Ibn Khaldun’s Philosophy of History; pp. 57-60.

[20] Enan, M.A. Ibn Khaldun: His Life and Work; pp. 96-100.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s