Ibn Khaldun was born shortly before the Black Death devastated Europe, the Middle East and North Africa. He lost both parents to the disease when he was sixteen and it was estimated that one third of the population of Europe and the Middle East was wiped out. During this period, much of the Islamic world was falling into decline, regimes were rapidly changing and divisions among the people were appearing. It is against this backdrop of social and political turmoil that Ibn Khaldun rose to prominence.
Fuelled by a sharp intelligence and a sense of self-preservation, Khaldun led a shrewd life as political statesmen, currying favor where possible and changing allegiances when necessary. His career took him to government positions in Granada, Morocco, Algeria, Tunisia and Egypt, although it nearly ended as quickly as it began when he was sentenced to a 22-month prison sentence at the age of 25 for scheming against his employer, the Sultan of Tunisia. He was released with the next regime change, before again scheming against the new Sultan and rapidly escaping the Sultanate.
Through his travels across the kingdoms of north Africa, Khaldun became friendly with the nomadic Berber tribes – indeed, he was much sought after as an emissary by African rulers keen to communicate with the Berbers – and when he tired of political life in 1375, he retired to the Sahara desert to live under the tribes’ protection. It was here that he began to meditate on the civilizations he had encountered and started to write his epic history of the Arabs. The long introduction to this work was the Muqaddimah, upon which most of his reputation rests. It was in this work that he traced the development of civilization and demonstrated that as societies achieved stability they were able to benefit from the division of labor and begin producing culture and science. According to Khaldun, luxury was developed at the expense of self-reliance, and put societies at risk from nomadic, uncultured insurgents, such as the Mongols and the Berbers. This same phenomenon was observed by Khaldun in his own lifetime. One of the key concepts he expounded was that of Asabiyyah; social cohesion. He noted that this was one thing the uncultured tribes did have a strong sense of and suggested that in larger civilizations, unifying religion was necessary to maintain this concept of clanship.