Ibn Khaldun
Ibn Khaldun was born in 1332 in Tunis into a distinguished family of Andalusian origin; at seventeen he lost both parents to the Black Death. He spent his life moving between the courts of North Africa and Spain as secretary, minister and envoy, was repeatedly caught up in palace intrigues and twice imprisoned. In 1375, weary of politics, he withdrew to a castle in Algeria and in four years wrote the Muqaddimah. In later life he was chief judge in Cairo, and in 1401 he met Tamerlane face to face outside the walls of Damascus. He is regarded as a forerunner of sociology and the philosophy of history.