Around 1121, at Tinmel in the High Atlas, Ibn Tumart was acclaimed as the Mahdi, the rightly guided one whose coming was expected. The claim was not vague. His followers held that he was preserved from error, that his teaching settled disputes, and that obedience to him was owed, and the movement's genealogists supplied a descent from the Prophet.
Around that claim he built an organisation. The sources describe ranked councils, an inner group of ten and a wider council of fifty, a body of instructors, a graded curriculum with memorised texts, and a discipline enforced by inspection and by purge. It is closer to the structure of a state than to that of a preaching mission, and it was in place before the movement had a capital or a territory worth the name.
He died at Tinmel in 1130 after a defeat outside Marrakesh, and the sources say his death was concealed for some time while the succession was arranged. Abd al-Mumin, a Zenata Berber from what is now western Algeria who had joined him early, took over and within twenty years held Morocco, then Ifriqiya and al-Andalus. The Almohad caliphate that resulted was the only power ever to rule the whole Maghreb and Muslim Spain together, and its official doctrine remained the one Ibn Tumart had taught in the mountains.