Abu Zayd Abd ar-Rahman ibn Muhammad ibn Khaldun al-Hadrami was born in Tunis on May 27, 1332, into a family that had once wielded considerable political influence in Andalusia and North Africa. The Khaldun family traced its roots to Hadramaut in Yemen, but had settled in Seville during the early centuries of Muslim rule in Iberia. When the Christian Reconquista made Seville untenable in the mid-thirteenth century, the family emigrated to Tunis, where they continued to occupy positions of administrative importance under the Hafsid dynasty. Ibn Khaldun grew up, then, in an atmosphere of scholarly refinement and political awareness — and with a family memory of displacement, of civilizations rising and falling, that would profoundly shape his intellectual work.
Education and Early Career
Ibn Khaldun received the standard education of a well-born Muslim intellectual of the fourteenth century: memorization of the Quran, study of hadith (prophetic traditions), Arabic grammar and poetry, jurisprudence in the Maliki school, and the rational sciences — logic, philosophy, and mathematics. His teachers included some of the most distinguished scholars in the Maghreb. The Black Death struck Tunis in 1348–1349, killing both of his parents and several of his teachers, and the sixteen-year-old Ibn Khaldun found himself abruptly thrust into adulthood. The plague's devastation — which he witnessed firsthand and later described as a catastrophe that "overtook the dynasties" and "swallowed up many of the good things of civilization" — may have planted the seeds of his later preoccupation with the fragility of human societies.
He entered political life young, serving as a calligrapher and seal-bearer for the Hafsid ruler in Tunis before moving on to serve the Marinid sultan in Fez. Over the next two decades, Ibn Khaldun pursued a turbulent political career across the courts of North Africa and Andalusia. He served rulers in Fez, Granada, Bougie (modern Bejaia in Algeria), Tlemcen, and Biskra — sometimes as a trusted advisor, sometimes as a prisoner, frequently as a schemer playing rival dynasties against one another. He was ambitious, politically adept, and not above intrigue. Twice he was imprisoned for his machinations. He briefly served Muhammad V of the Nasrid dynasty in Granada, where he conducted a diplomatic mission to Pedro the Cruel of Castile — a remarkable encounter between the Muslim intellectual and the Christian king.
The Retreat to Qalat Ibn Salama
By 1375, Ibn Khaldun was exhausted by the instabilities and betrayals of North African court politics. He withdrew to the fortress of Qalat Ibn Salama, a remote castle in the province of Oran in what is now western Algeria, under the protection of the local Awlad Arif tribe. There, in what he later described as an almost feverish burst of intellectual activity, he composed the Muqaddimah — the "Introduction" — in approximately five months. It was intended as the prolegomenon to his larger universal history, the Kitab al-Ibar (Book of Lessons), but it far surpassed the work it was meant to introduce. The Muqaddimah is one of those rare works that seems to arrive from outside the intellectual framework of its own time.
What Ibn Khaldun produced in that fortress was nothing less than a new science. He called it ilm al-umran — the science of civilization, or the science of human social organization. He was explicit that this was a discipline no previous thinker had attempted in any systematic way. He was largely correct.
The Muqaddimah and the Science of Civilization
The Muqaddimah begins with a devastating critique of existing historical writing. Previous historians, Ibn Khaldun argued, had been content to uncritically transmit reports, accepting fantastical claims without subjecting them to rational scrutiny. They recorded that the armies of the Israelites numbered 600,000 armed men, or that the city of Iram had pillars of gold — and never paused to ask whether such things were plausible given what we know about how human societies actually function. History, Ibn Khaldun insisted, must be grounded in an understanding of the underlying laws that govern human social organization. Without such a framework, the historian is merely a transcriber of fairy tales.
The central concept of the Muqaddimah is asabiyyah — a term variously translated as "group feeling," "social cohesion," "tribal solidarity," or "esprit de corps." For Ibn Khaldun, asabiyyah is the binding force that holds a group together and gives it the collective will to act, to fight, to seize power. It is strongest among nomadic and tribal peoples — Bedouins, mountain dwellers, pastoral communities — whose harsh conditions of life forge tight bonds of mutual dependence. It is weakest among urban, sedentary populations, who have grown accustomed to luxury, specialization, and the comforts of civilization.
From this single concept, Ibn Khaldun derived a cyclical theory of history that is breathtaking in its scope. A dynasty begins when a group with strong asabiyyah — typically from the desert or the margins — conquers a sedentary civilization whose own asabiyyah has decayed. The conquerors establish a new dynasty and enjoy the wealth and culture of the civilization they have seized. But over three to four generations, the ruling group itself becomes sedentary, luxurious, and soft. Its asabiyyah weakens. It becomes dependent on mercenary armies and tax revenue. Eventually, a new group from the periphery — hungrier, more cohesive, tougher — rises to overthrow it. The cycle repeats. Ibn Khaldun saw this pattern playing out across the entire history of the Islamic world, from the original Arab conquests through the Berber dynasties of his own era.
Cairo, the Judgeship, and Tamerlane
In 1382, Ibn Khaldun left the Maghreb for Egypt, settling in Cairo — then the largest and most intellectually vibrant city in the Islamic world. He was received with honor, lectured at Al-Azhar University, and was appointed chief Maliki judge of Egypt by the Mamluk sultan Barquq. His tenure as judge was stormy: he attempted to root out corruption in the courts, made powerful enemies, and was dismissed and reappointed several times. He continued to revise and expand the Muqaddimah and the Kitab al-Ibar during these years, incorporating new material and sharpening his arguments.
The most dramatic episode of his later life came in 1401, when Tamerlane (Timur) besieged Damascus. Ibn Khaldun, who was in the city at the time as part of the Mamluk sultan's entourage, was lowered over the city walls by rope to meet the Turco-Mongol conqueror. The two men — the seventy-year-old historian and the world-conqueror — spent several weeks in conversation. Tamerlane questioned Ibn Khaldun extensively about the Maghreb and its geography, reportedly hoping to use his knowledge for a future campaign in North Africa. Ibn Khaldun, for his part, was acutely aware that he was witnessing the very forces his theory described: a leader of immense asabiyyah, at the head of a cohesive military force, smashing a sedentary civilization. He wrote a detailed account of the encounter. Damascus was sacked regardless.
Legacy and Influence
Ibn Khaldun died in Cairo on March 17, 1406, and was buried in the Sufi cemetery outside Bab an-Nasr. His work was known and admired in the Islamic world — Ottoman historians read and cited the Muqaddimah, and it influenced thinkers from the Maghreb to Central Asia — but its full impact was delayed by centuries. European scholars began to encounter the Muqaddimah in the nineteenth century, and recognition of its significance has only grown since.
The range of disciplines that claim Ibn Khaldun as a forerunner is remarkable. Historians regard the Muqaddimah as the founding text of historiography — the first systematic argument that history should be treated as a science, subject to verifiable laws, rather than as a literary or moral exercise. Sociologists identify him as the first social scientist, four centuries before Auguste Comte coined the term "sociology." Economists point to his analysis of supply and demand, the division of labor, and the relationship between taxation and revenue — his observation that excessively high taxes ultimately reduce state revenue anticipates the Laffer curve by six hundred years. Political scientists study his theory of state formation and decay. Anthropologists value his careful analysis of the differences between nomadic and sedentary societies.
Arnold Toynbee called the Muqaddimah "undoubtedly the greatest work of its kind that has ever yet been created by any mind in any time or place." This may be an overstatement born of the enthusiasm of discovery, but it is not an absurd one. Ibn Khaldun did something that very few thinkers in any civilization have done: he looked at the vast, chaotic sweep of human history and discerned a pattern — not a divine plan, not a moral narrative, but a pattern rooted in observable human behavior and social organization. That he did so in a fourteenth-century North African fortress, working largely alone and without precedent, remains one of the most extraordinary intellectual achievements in recorded history.