Ibn Khaldoun relates that the Chancellor sent his brother Abû al-Alâ 'Idrîs to Béjaïa to take care of the finances of the city, alongside the governor, the Almohad Muḥammad ben Abi Hilâl al-Hintâtî.
The latter had already revolted against Abû `Abd Allah Muhammad al-Mustansir, his brother and father of Abu Zakariyâ Yahyâ II, and had fled to Andalusia then to Tlemcen.
[5] Welcomed by Muḥammad ben Abi Hilâl al-Hintâtî and the notables of Béjaïa, he took the city in April 1279 and in August of the same year entered Tunis where he was recognized as sultan.
His seizure of the throne was peaceful after the army leaders rose up and agreed to recognize him as the new sultan.
[4] Abu Zakariya Yahya yielded his throne to his uncle, but as soon as he took power, Ibrahim ordered the execution of his predecessor and his three children.