The Almohad movement originated with Ibn Tumart, a member of the Masmuda, a Berber tribal confederation of the Atlas Mountains of southern Morocco. At the time, Morocco, and much of the rest of North Africa (Maghreb) and Spain (al-Andalus), was under the rule of the Almoravids, a Sanhaja Berber dynasty. Early in his life, Ibn Tumart went to Spain to pursue his studies, and thereafter to Baghdad to deepen them. In Baghdad, Ibn Tumart attached himself to the theological school of al-Ash'ari, and came under the influence of the teacher al-Ghazali. He soon developed his own system, combining the doctrines of various masters. Ibn Tumart's main principle was a strict unitarianism (tawhid), which denied the independent existence of the attributes of God as being incompatible with His unity, and therefore a polytheistic idea. Ibn Tumart represented a revolt against what he perceived as anthropomorphism in Muslim orthodoxy. His followers would become known as the al-Muwaḥḥidūn (Almohads), meaning those who affirm the unity of God.