At the time, Morocco, al-Andalus and large parts of Maghreb, were ruled by the Almoravids, a Maliki puritanical Saharan Sanhaja Berber movements, who founded the city of Marrakesh and are credited with spreading Islam to much of West Africa. To pursue his education, Ibn Tumart went as a young man (c. 1106) to Qortoba, which was at the time the biggest centre of learning in the Almoravids dominion, where he was a disciple of at-Turtushi. Thereafter, Ibn Tumart went east to deepen his studies where he came under the influence al-Ghazali's ideas (Almohad historians such as al-Marrakushi support that he met and studied under al-Ghazali, but this contradicts what other historians like Ibn Khallikan have said, and modern historians also maintain that it is unknown whether this encounter actually happened). He met and studied under both Mu'tazili and Ash'ari theologians. De Lacy O'leary states that, in Baghdad, he attached himself to the Ash'arite school of theology and the Zahirite school of jurisprudence, but with the creed of Ibn Hazm which differed significantly from early Zahirites in its rejection of Taqlid and reliance on reason. However, Abdullah Yavuz, argues the following: