Abdurahman Ibn Khaldun was a product of the Muslim expansion from Saudi Arabia to North Africa to Spain. Though he was born at the beginning of the decline of the Muslim empire, his life reflected the growth of a people and their ideas. His ancestors were among the first Yemenites to emigrate to Spain during the era of Muslim civilization in al-Andalus (711 to 1492). People of ideas and action, this upper-class family first settled in Seville at the beginning of the thirteenth century, then left Spain and relocated in Tunis, where Ibn Khaldun was born. His schooling consisted of the learning of the Koran, the sayings of the Prophet, after which he was initiated into literature, poetry, philosophy, logic, and mathematics. Drawn to the power center of Fez, capital of Morocco's Marinid dynasty, he spent eight years studying at the Karouiine University. Great scholars such as Ibn Khatib introduced him to Abu Abdellah Beni AlAhmar, the third sultan of Granada, who was temporarily in Morocco looking for support. Later the sultan sent Ibn Khaldun to Seville to negotiate a peace treaty with the king of Castile and Granada. For his services, he received an irrigated parcel of land in Granada, where he moved with his family. Spain's instability—the Christians were engaged in the reconquest of their land—forced him to relocate at Qalat Ibn Salama, near Oran in Algeria, where he wrote the first draft of the Muqaddimah. This work outlining his view of world history gained the respect of Muslim scholars. It was not until 1851 that his Histoire des Berbères, extracted from his universal history Kitab al-'Ibar (published in 1867), was translated into French, thus making his work accessible to Western society. Later Muqaddimah was translated as well under the title Prolégomènes d'Ibn Khaldoun (1862-1868).
After his pilgrimage to Mecca he settled in Egypt, where he spent his last twenty-four years serving as a judge (qadi) and giving lectures at Al-Azhar