The Banu Ghaniya were a Massufa Sanhaja Berber dynasty and a branch of the Almoravids.[1][2] Their first leader, Muhammad ibn Ali ibn Yusuf, a son of Ali ibn Yusuf al-Massufi and the Almoravid Princess Ghaniya, was appointed as governor of the Balearic Islands in 1126.[3][4] Following the collapse of the Almoravid power at the hand of the Almohads in the 1140s, the Banu Ghaniya continued to govern the Balearic Islands as independent emirs until about 1203, with a brief interruption in the 1180s. Later leaders (Ali ibn Ishaq and Yahya) made a determined attempt to reconquer the Maghreb (and in particular Ifriqiya), taking Bougie, Constantine and Algiers,[5] and conquering most of modern Tunisia[6] from about 1180 onwards.
They were influential in the downfall of the Almohad Empire in Eastern Maghrib.[3] In Tunisia, Ali ibn Ishaq adhered to the Abbasid Caliphate and was formally appointed by Al-Mustadi with the title of "heir of the Almoravids".[7]