It was probably while in Baghdad that Ibn Tumart began to develop a system of his own by combining the teachings of his Ash'arite masters with parts of the doctrines of others, with a touch of Sufi mysticism imbibed from the great teacher al-Ghazali. Almohad hagiographers report that Ibn Tumart was in al-Ghazali's presence when news arrived that the Almoravids had proscribed and publicly burned his recent great work, "Ihya' Ulum al-Din", upon which al-Ghazali is said to have turned to Ibn Tumart and charged him, as a native of those lands, with the mission of setting the Almoravids right.