Ibn Tufail (1105 – 1185) was better known in his time as a philosopher, court physician, mathematician, and later vizier to the Sultan of Morocco. Born in Guadix near Granada he studied under Ibn Bajjar, a writer of many significant works inspired by Aristotle. He wrote extensively on astronomy and Islamic theology too, earning the reputation as being one of the foremost polymaths of his day. He later inspired Ibn Rushd (Averroes), another great polymath and Aristotelian. After a long professional career in Granada, Ibn Tufail eventually returned to Marrakech where he died in 1185.