 Al Mahdi established his headquarters at Salamiyah and moved towards north-western Africa, under Aghlabid rule.His success of laying claim to being the precursor to the Mahdi was instrumental among the Berber tribes of North Africa, specifically the Kutamah tribe.Al Mahdi established himself at the former Aghlabid residence at Raqqadah, a suburb of Al-Qayrawan in Tunisia.