Ibn Khaldun: The Historian Who Watched a Mongol Conqueror Burn a City He Was Standing In
In January 1401, a fifty-eight-year-old North African scholar sat inside the walls of Damascus discussing the rise and fall of Arab civilization with Timur, the Mongol conqueror who was about to raze the city around him. Ibn Khaldun survived the encounter, and out of the political chaos that had already defined his life, he had five years earlier finished a book that a twentieth-century historian would later call the greatest work of its kind ever produced by any mind, in any time or place.
A Family Twice Displaced
Ibn Khaldun's family traced its origins to a South Arabian tribe that had settled in Spain during the early Muslim conquest, prospering for generations as administrators and scholars in Seville before the advancing Christian reconquest pushed them across the strait into North Africa in the thirteenth century, where they eventually settled in Tunis and continued in government service. Ibn Khaldun was born there on May 27, 1332. His comfortable, intellectually rich upbringing was violently interrupted by the Black Death, which killed both of his parents and many of his teachers, and which he would later credit, in the Muqaddimah itself, with tearing apart the fabric of the civilization he had been born into. He was educated in the standard religious curriculum of Quran, Islamic law, and theology, but his decisive intellectual formation came between 1347 and 1352 under the mathematician and philosopher Muhammad Ibn Ibrahim al-Abili, who introduced him to the philosophical tradition of Avicenna and Averroes and to currents of heterodox thought well outside the religious mainstream.
A Life Spent Serving and Fleeing Princes
For roughly three decades, Ibn Khaldun's career was less that of a scholar than of a courtier who kept getting arrested by the courts he served. He arrived at the Marinid court in Fez in 1354, gained real intellectual opportunity, and was imprisoned for twenty-one months in 1357 on suspicion of conspiracy. He moved to Granada in 1362 to a warmer welcome, was sent in 1364 on a diplomatic mission to the Castilian king Pedro the Cruel, and was driven out again by court rivals. He administered affairs for a Hafsid prince in Bougie in 1365 and 1366, buffeted by the same regional instability everywhere he went. By his own account he had, by his mid-forties, grown thoroughly disillusioned with political service and its constant switching of allegiance between rival Muslim rulers across the Maghreb.
Twenty questions, eight minutes on the clock, and a percentile measured against everyone who has taken it. No sign-up.
Take the IQ test →Four Years in a Fortress
In 1375 Ibn Khaldun withdrew from politics altogether, retreating to the fortress of Qal'at Ibn Salamah near Oran in Algeria, where over roughly four years he wrote the *Muqaddimah* — literally "Introduction" — completing the first draft in November 1377 as the opening volume of a planned universal history of the Arabs and Berbers. He called his method *ilm al-umran*, "the science of culture," and used it to sketch what modern readers recognize as general sociology, political sociology, urban sociology, economic sociology, and a sociology of knowledge, organized across six books. Its unifying concept was *asabiyyah* — social cohesion, the bond of kinship and shared purpose that, intensified by religious ideology, propels a tribal or dynastic group to power, and whose inevitable erosion across three or four generations of settled luxury explains that same group's decline. Ibn Khaldun rejected any notion of linear historical progress in favor of a cyclical model of rising and decaying dynasties, though he also recognized, writing in the shadow of the plague, that his own era represented an unusually sharp rupture — what he called a world "brought into existence anew."
Cairo and the Judge's Bench
Ibn Khaldun spent his final and most stable years in Egypt, arriving in Cairo in January 1383 after slipping out of Tunis under cover of a pilgrimage. There he found, at last, the professional recognition that had eluded him across the Maghreb, holding a series of teaching posts and being appointed chief judge of the Malikite school of Islamic law six separate times — each appointment ending in dismissal amid Mamluk court politics, each followed eventually by reinstatement. His sixth and final appointment as chief judge came only days before his death.
The Encounter With Timur
The most vivid episode of Ibn Khaldun's life came in early 1401, when the Mamluk sultan's court that employed him marched to defend Damascus against the invading army of Timur. As the city's defenders negotiated and then collapsed, Ibn Khaldun found himself lowered by rope over the city walls to meet the conqueror directly, and the two men spent what accounts describe as extended conversations about the history and character of the Arab world, conversations detailed enough that Ibn Khaldun later wrote them up himself. Timur's forces went on to sack and burn Damascus; Ibn Khaldun's life was spared, and he made his way back to Cairo, where he died on March 17, 1406, at seventy-three.
Why Ibn Khaldun Is Called a Genius
The specific claim made for Ibn Khaldun is not literary or aesthetic but methodological: he is credited, particularly by nineteenth-century European orientalists who rediscovered the Muqaddimah, with inventing a genuinely empirical, causal approach to history centuries before anyone in Europe did the same, treating economic conditions, group psychology, and social structure as forces that could be studied and generalized about rather than merely narrated. The historian Arnold Toynbee called the Muqaddimah's philosophy of history "undoubtedly the greatest work of its kind that has ever yet been created by any mind in any time or place," and later scholars have credited him as a genuine forerunner of sociology, historiography, and even economics, with some finding in his analysis of labor, value, and state spending anticipations of ideas later associated with both Adam Smith and Karl Marx. The honest complication is that this reputation is substantially a retrospective one: Ibn Khaldun was largely unread and uninfluential for four centuries, a working judge and civil servant whose masterwork sat outside the mainstream of Islamic historical writing in his own time and was elevated to founding-father status only after European scholars translated and championed it starting in the 1800s. His genius, on the evidence, was real but singular — one extraordinary theoretical work produced in a few isolated years away from a career otherwise spent surviving the same cycles of court intrigue and dynastic collapse that the book itself describes.
Legacy
Ibn Khaldun's Muqaddimah is now taught as a founding text of historiography and social science across university curricula worldwide, and asabiyyah remains a live analytical term in political science for explaining group cohesion, state formation, and dynastic decline. His life — judge, diplomat, prisoner, refugee, and, for one four-year stretch in an Algerian fortress, theorist — remains most often summarized by the single image of a scholar sitting inside a besieged city, calmly analyzing the empire that was about to burn it down.
Achievements
- Wrote the Muqaddimah (1377), a pioneering theory of how societies rise and fall
- Regarded as a founding figure of sociology, demography, and the philosophy of history
- Introduced the concept of asabiyyah, or social cohesion, as the engine of political power

.jpg)