
In the mid-fourteenth century, the Black Death swept through Tunis, claiming the parents and teachers of a young nobleman named Abū Zayd 'Abdu r-Rahman bin Muhammad bin Khaldūn Al-Hadrami.
In the autumn of 1375, a middle-aged Arab diplomat and scholar named Ibn Khaldun retreated to Qalat Ibn Salama, a mountain fortress in what is now western Algeria, seeking safety among the local Berber tribes. Behind him lay more than two decades of intense political survival. He had served sultanates across North Africa and Muslim Spain, operating in a landscape characterized by fragile dynasties, sudden palace coups, and shifting allegiances. He had been imprisoned in Fez, had negotiated peace treaties with Christian kings in Castile, and had survived the betrayal of close friends. He had also survived the Black Death of 1348, which had swept through his native Tunis when he was seventeen, carrying away his parents, many of his teachers, and the stable world of his youth. Now, exhausted by the treacherous nature of political life, he sought quiet. In this mountain isolation, he began writing a history of the world. But before he could record what had happened, he realized he needed to explain why it happened. Over the course of five extraordinary months, he produced the Muqaddimah (the "Introduction"), a work that attempted to uncover the hidden laws governing human society, the rise and fall of civilizations, and the patterns of history itself.
To understand how Ibn Khaldun arrived at this breakthrough, one must look at the world that shaped him. Born in Tunis in 1332 into an aristocratic Andalusian family of Arab descent, he grew up with a deep awareness of loss and displacement. His ancestors had been high-ranking officials in Seville, but they had fled to North Africa after the city fell to the Christian Reconquista in 1248. In Tunis, the family maintained its prestige, and the young Ibn Khaldun received a rigorous classical Islamic education, memorizing the Quran and mastering Arabic linguistics, Islamic law, and theology. Under the guidance of the mathematician and philosopher Al-Abili, he also studied logic, mathematics, and the rationalist philosophies of Averroes and Avicenna. This education gave him a unique intellectual toolkit: a deep reverence for the Islamic scholarly tradition combined with a sharp, analytical mind trained to look for rational causes behind physical phenomena.
When the plague decimated the scholarly community of Tunis in 1348, the old social and political structures collapsed. Seeking to carve out a place for himself in the resulting chaos, Ibn Khaldun entered state service at the age of twenty, beginning as a seal-bearer in Tunis before moving to the Marinid court in Fez. The North Africa of his youth was a fragmented world where the Hafsid, Marinid, and Abdalwadid dynasties competed fiercely for dominance, relying on fluid alliances with nomadic Berber and Arab tribes. Ibn Khaldun proved to be an exceptionally skilled, if highly opportunistic, player in this arena. He schemed against employers, switched sides when fortunes turned, and moved between Fez, Granada, and Tlemcen. In Granada, he became a favorite of the Nasrid Sultan Muhammad V, even traveling to Seville on a diplomatic mission to negotiate with King Pedro the Cruel. Yet, his political ambitions constantly provoked the jealousy of rivals, notably the Granadan vizier Ibn al-Khatib. Ibn Khaldun’s life became a cycle of rapid ascents to high office, followed by sudden disgrace, exile, or imprisonment.
+ 12 further connections to entries not yet ingested
This turbulent career provided the empirical data for his intellectual masterpiece. While living among the Berber tribes after 1375, Ibn Khaldun began to analyze the rise and fall of the states he had served so intimately. He observed that history was not merely a collection of dates and tales of great kings, but a science governed by social laws. At the heart of his theory was the concept of asabiyyah, which can be translated as social cohesion, group solidarity, or collective consciousness. He argued that this solidarity was strongest among nomadic people, such as the Bedouin and the Berbers, whose harsh environment forced them to rely on one another for survival. This intense asabiyyah gave nomadic groups the military superiority and shared will needed to conquer cities and establish new empires.
According to Ibn Khaldun’s cyclical theory of history, once a nomadic group conquered a civilized, urban territory, the clock began to tick on their decline. The new rulers would establish a dynasty and enjoy the fruits of urban life, but the comforts of civilization would slowly erode their asabiyyah. Over the course of three or four generations, the ruling elite would grow accustomed to luxury, lose their martial spirit, and become detached from the people they ruled. To maintain their lifestyle and defend their borders, they would increase taxes and rely on foreign mercenaries rather than their own kin. This internal decay made the empire vulnerable to a new group of nomads, who possessed the raw, unbroken asabiyyah that the civilized rulers had lost. The cycle would then begin anew. This brilliant synthesis anticipated the insights of modern sociology, economics, and demography by centuries, offering a systemic explanation of how human societies organize, thrive, and decay.
Realizing that he lacked the reference texts in his mountain retreat to complete his grand universal history, Ibn Khaldun returned to Tunis in 1378 under the protection of the Hafsid sultan Abū l-Abbas. However, the political environment remained tense, and his relationship with the sultan soured after Ibn Khaldun presented him with a completed draft of his history that conspicuously omitted the customary praise of the ruler. Sensing danger, Ibn Khaldun used the pretext of performing the Hajj pilgrimage to secure permission to leave Tunis. In 1382, he sailed for Alexandria, escaping the volatile political landscape of the Maghreb for the grand, stable heart of the Islamic world: Mamluk Egypt.
Upon arriving in Cairo, Ibn Khaldun was awed by its wealth and scale, famously remarking that those who had not seen Egypt did not truly understand the power of Islam. In this prosperous metropolis, far removed from the border conflicts of the west, he found a second life. The Mamluk Sultan, al-Malik udh-Dhahir Barquq, recognized his immense scholarship and appointed him as the Grand Qadi, or chief judge, of the Maliki school of law, as well as a professor at several prestigious Cairo madrasas, including al-Azhar. Ibn Khaldun’s time in Cairo, however, was not without tragedy. In 1384, a ship carrying his wife and children from Tunis sank off the coast of Alexandria, depriving him of his family. He threw himself into his work, attempting to reform the Egyptian judicial system, which he viewed as corrupt and lax. His uncompromising standards and critical attitude toward Egyptian customs alienated the local elite, leading to a series of dismissals and reappointments to his judgeship over the final two decades of his life.
Ibn Khaldun’s final major historical encounter took place in 1401, when he accompanied the Mamluk sultan’s military campaign to Damascus to defend the city against Tamerlane, the formidable conqueror who had swept across Asia. During the siege of Damascus, Ibn Khaldun was lowered over the city walls in a basket to negotiate with Tamerlane in his camp. The two men—one the world’s greatest living theorist of political power, the other its most ruthless practitioner—spent several weeks in deep conversation. Ibn Khaldun spoke of the laws of history, while Tamerlane questioned him extensively about the geography and dynasties of North Africa. It was a fitting final act for a man who had spent his life navigating the dangerous waters of imperial power.
Ibn Khaldun died in Cairo in 1406, leaving behind a body of work that challenged the very nature of how human beings understand their past. While his writings had a profound impact on later Ottoman historians of the seventeenth and nineteenth centuries, who used his theories of decay to analyze the fortunes of their own empire, his true significance was only fully recognized globally in the modern era. By treating history not as a series of divine interventions or moral fables, but as a field of study governed by observable, rational laws of human behavior, Ibn Khaldun laid the groundwork for the modern social sciences, offering a lens through which we still view the rise and fall of human civilizations.