The Alids were also persecuted during the Abbasid Caliphate (). Some of them revolted, including the Hasanid brothers Muhammad ibn Abd-Allah () and Ibrahim, while some others took refuge in remote areas and founded regional dynasties in the southern shores of the Caspian sea, Yemen, and western Maghreb. For instance, the revolt of the Hasanid Husayn ibn Ali al-Abid was suppressed in 786 but his brother Idris () escaped and founded the first Alid dynasty in Morocco. Some of the quiescent imams of the Imamites were also probably killed by the Abbasids, including Muhammad al-Jawad () and his son, Ali al-Hadi (). Their followers also believe that the birth of their twelfth imam, Muhammad al-Mahdi, was hidden for fear of Abbasid persecution and that he remains in occultation by divine will since 874, until his reappearance at the end of time to eradicate injustice and evil. They became known as the Twelvers. Meanwhile, the only historic split among the Imamites happened after the death in 765 of their sixth imam, the quiescent Ja'far al-Sadiq. Some claimed that his designated successor was his son Isma'il, who had predeceased al-Sadiq. These followers permanently separated and later formed the Isma'ilites. The Isma'ilites vigorously opposed the Abbasids, and their efforts culminated in the establishment of the Fatimid Caliphate () in North Africa.
