In 1375, craving solitude from the exhausting business of politics, Ibn Khaldūn took the most momentous step of his life: he sought refuge with the tribe of Awlād ʿArīf, who lodged him and his family in the safety of a castle, Qalʿat ibn Salāmah, near what is now the town of Frenda, Algeria. There he spent four years, “free from all preoccupations,
”and wrote his massive masterpiece, the Muqaddimah, an introduction to history. His original intention, which he subsequently achieved, was to write a universal history of the Arabs and Berbers, but before doing so he judged it necessary to discuss
historical method, with the aim of providing the criteria necessary for distinguishing historical truth from error. This led him to formulate what the 20th-century English historian Arnold Toynbee has described as “a philosophy of history which is undoubtedly the greatest work of its kind that has ever yet been created by any mind in any time or place,” a statement that goes even beyond the earlier eulogy by Robert Flint: