In the high Atlas, a well-read man of the name "Ibn Toumert" preaches the return to a faith in unicity of God. He is presented in the form of a " Mahdi" (envoy of God). The Almohades, which indicates those which proclaim unicity of God, leave in war against Almoravides, under control of "Abd el-Moumin".
The latter demolishes Almoravides in 1147 and assumes the religious title of caliph, consolidates the administration of its state and founds universities. An example is the construction of the Koutoubia Mosque. Its descendants will reign with brilliance during a half-century, after what they are defeated by the Christians in 1212.