Red Sea. This put the Banu Kanz in control of Wadi Allaqi's mines, the routes connecting the mines to Aswan and the Red Sea port town of Aydhab and the trade between Nubia and Egypt. Altogether, this enabled the Banu Kanz to derive substantial wealth and influence. Despite their power, the Banu Kanz were not independent from the Fatimid state and the Kanz al-Dawla, who reported to the Fatimid governor of Qus, benefited from the integral role he played within the Fatimid system. The caliphs accorded the Kanz al-Dawla responsibility for regulating Fatimid diplomatic ties and commerce with Nubia, tax collection in the frontier villages, protecting the mines of Wadi Allaqi and travelers and caravans passing through the principality. The Maris-based Nubian counterparts of the Kanz al-Dawla played a similar role and also belonged to a minor branch of the Rabi'ah-Hadariba confederation. Conflict with the Ayyubids In 1168, the Banu Kanz provided safe haven to the disbanded black African regiments of the Fatimid army by the influential aides of Caliph al-Adid, Shirkuh and his nephew Saladin. Saladin toppled al-Adid in 1171 and established the Ayyubid Sultanate in Egypt. In 1171/72, the Nubian army, together with the Fatimids' former black African contingents, attempted to occupy Upper Egypt and sacked Aswan, prompting the Kanz al-Dawla to request military assistance from Saladin, to which he complied. The Ayyubids and the Banu Kanz drove out the Nubians and the Fatimid rebel army units from Upper Egypt. Although the Ayyubids helped the Banu Kanz in repelling the Nubian invasion, their rule also saw the rise of a Syrian Turco-Kurdish military elite in Egypt at the expense of the Arab tribes and African regiments, both of which the Fatimids had maintained close ties with and at one point governed Egypt. Accordingly, the Banu Kanz and the Arab tribes of Upper Egypt felt that their iqta (fiefs) and official privileges were threatened by the new Ayyubid order. When Saladin transferred the iqta of the Banu Kanz to an Ayyubid emir (a brother of senior Ayyubid emir Abu al-Hayja al-Samin), the Banu Kanz killed the emir and his retinue. In 1174, Ibn al-Mutawwaj, the Kanz al-Dawla, launched an insurrection against the Ayyubids to restore the Fatimids. He gained the support of other Arab tribes in the region and the African regiments and sought to join the revolt of Abbas ibn Shadi, the leader of the Arab tribes in