The Kharaj of Banu Ubayd Allah initially opposed the Zenata Abdelwadids, but later allied with them when they were severely defeated by Yghmoracen, the first Abdelwadid Sultan. When the Merinids replaced the Abdelwadids the Kharaj remained faithful to the Abdelwadids since those, at the decline, had given them tax collection privileges. The Merinid Sultan, Abu al-Hassan then stripped them of these acquired advantages and gave them instead to the Berber Beni Iznassen tribe. Unhappy with this treatment, the Kharaj rebelled, killed the Merinid governor of the Saharan Ksours, Yahya ibn Al-iz, and escaped far eastwards to the remote desert in fear of the Sultan's retaliation.