The most stable of the successor dynasties founded in the ninth and tenth centuries was that of the Fatimids, a branch of Shi’is. The Fatimids won their first success in North Africa, where they established a rival caliphate at Raqqadah near Kairouan and, in 952, embarked on a period of expansion that within a few years took them to Egypt.
For a time the Fatimids aspired to be rulers of the whole Islamic world, and their achievements were impressive. At their peak they ruled North Africa, the Red Sea coast, Yemen, Palestine, and parts of Syria. The Fatimids built the Mosque of al-Azhar in Cairo – from which developed al-Azhar University, now the oldest university in the world and perhaps the most influential Islamic school of higher learning. Cairo became an important center of art and learning. Fatimid merchants traded with Afghanistan and China and tried to divert some of Baghdad’s Arabian Gulf shipping to the Red Sea.
But the Fatimids’ dreams of gaining control of the Islamic heartland came to nothing, partly because many other independent states refused to support them and partly because they, like the ‘Abbasids in Baghdad, lost effective control of their own mercenaries. Such developments weakened the Fatimids, but thanks to a family of viziers of Armenian origin they were able to endure until the Ayyubid succession in the second half of the twelfth century – even in the face of the eleventh-century invasion by the Seljuk Turks.
At the begining of the 10th century an Ismaili leader named Ubayd Allah went to Ifriqiya (present day Tunisia) in north Africa. He claimed descent from the Prophet’s daughter Fatima through Ismail’s son Muhammad, making him the “hidden imam” for whom the Ismailis were waiting. In 909 he proclaimed himself al-Mahdi (“the Rightly Guided One”), build a new capital on the coast, called Mahiya, and started to put together a large fleet of ships. He reigned until 934 as the first Fatimids caliph.