Arabic: 'ibn khaldūn
Ibn Khaldoun's family was of the Tunisian elite, and he received a thorough education. He served at several courts in Maghreb. Still, due to the unstability of his time, he was twice imprisoned.
It was during one of his imprisonments, in what is today's Algeria, that he wrote his famous Foreword, (muqaddama) which would become the first volume of his Universal History (kitab al-¢abru).
Ibn Khaldoun's fame was so widespread even in his own days, that in 1400 he was received as an honoured guest with the Tatar ruler, Tamerlane.
The Universal History is a central source for the knowledge of the history of North Africa, and the Berber people. But it is his Foreword, in which he outlines his philosophy of history, explaining how dynasties had a tendency to last for a period of 3 generations, after which a new dynasty would wipe it out.
Typically, North African dynasties, like the ones of the Almohads and Almoravids, had lasted about a century, or 3 generations.
Underlying this theory was the observation that the first generation of a dynasty retained the hard and demanding life of the countryside, while the second generation would be absorbed into the local culture, and the third generation degenerated into decadence, as it acquired all the trappings of urban life.
The weak third generation would to a large degree lack the capacity to defend itself, and was therefore an easy victim for the attack of a new rural dynasty.
Ibn Khaldoun saw a strong connection between social change and the climate and the level of economic activity. Societies were held together by social cohesiveness, and according to his theories religion served as a strengthening factor.