The latter was defeated by the Zirids during the reign of Ziri ibn Menad in 953. Ali then took refuge with the Maġrāwas. Al Kheyr Ibn Mūhāmmād Ibn Khazer of the Maġrāwī will help Hamza and Yahiya, son of Ali to cross to Spain. Ahmed son of Sulayman, son of Ibrahim was a chief of (Central Maghreb: Current Algeria). And among the descendants of Mūhāmmād, son of Sulayman, there is Ituwich, son of Hatech, son of Al Hassan, son of Muhammed, son of Sulayman, and Hammad, son of Ali, son of Mūhāmmād, son of Sulayman. Ibn Khaldun notes that Souk Hamza at Bougie, according to Ibn Hazm, does not bear the name of an Arab alid Idrissides, but of an Arab Sulaymanid. He adds that Jawhar al-Siqilli, General Fatimides, took Hamza's sons to Kairouan in Tunisia. According to Ibn Khaldūn in his appendix IV, Sīd Sūlāymān Ibn ‘Abd Allah al-Kāmīl escapes towards the Maghreb during the Abbasids, he arrives at Tiaret after the death of his brother Idris I and he wanted to take power. But the Berbers resist threats from Sīd Sūlāymān Ibn ‘Abd Allah al-Kāmīl and the Banu Tamim of the Arab Aghlabid dynasty decree the order to arrest him. Sīd Sūlāymān Ibn ‘Abd Allah al-Kāmīl went to Tlemcen and was master of all the Zenet tribes of this locality. His son Mūhāmmād Ibn Sūlāymān succeeds and his children share all of (Central Maghreb: present-day Algeria) after the death of their father Sīd Sūlāymān Ibn ‘Abd Allah al-Kāmīl. The government of Tlemcen was under the responsibility of (Aḥmād), son of (Mūḥāmmād) then to (Mūḥāmmād) son of (Aḥmād), then to (Al Qassem) son of (Mūhāmmād) son of (Aḥmād).