In 1062 Sanaa was taken over by the Sulayhid dynasty led by Ali al-Sulayhi and his wife, the popular Queen Asma. He made the city capital of his relatively small kingdom, which also included the Haraz Mountains. The Sulayhids were aligned with the Ismaili Muslim-leaning Fatimid Caliphate of Egypt, rather than the Baghdad-based Abbasid Caliphate that most of Arabia followed. Al-Sulayhi ruled for about 20 years but he was assassinated by his principal local rivals, the Zabid-based Najahids. Following his death, al-Sulayhi's daughter, Arwa al-Sulayhi, inherited the throne. She withdrew from Sanaa, transferring the Sulayhid capital to Jibla, where she ruled much of Yemen from 1067 to 1138. As a result of the Sulayhid departure, the Hamdanid dynasty took control of Sanaʽa.