Abdul Rahman Ibn Khaldun was an influential Arab thinker of the 14th century. His family were from Andalusia. Born in Tunisia in 1332, Khaldun served the governments of the day in many ways. He was sometimes in prison. He lived in Marrakesh in Morocco for a time, and in Granada. Then he moved to Cairo, where was a judge and died in 1406.