Fatimids: Shi'a Caliphate
Nearby to the west of Ifriqiya, the newly emerging Fatimid movement grew in strength and numbers. Thereafter the Fatimids began to launch frequent attacks on the Aghlabid regime. Such militant aggression provoked general unrest and increased Aghlabid political instability. The Fatimids eventually managed to capture Kairouan in 909, forcing the last of theb Aghlabid line, Ziyadat Allah III, to evacuate the palace at Raqadda. Concurrently the Rustamid state was overthrown. On the east coast of Ifriqiaya facing Egypt, the Fatimids built a new capital on top of ancient ruins, calling the seaport Mahdiya after their mahdi.
Read more about this topic: History Of Early Islamic Tunisia