The Berbers dominated the Fatimid army, known in Egypt as Maghriba (the westerners). Al-Aziz had introduced the Turkish and Iranian soldiers in the army, known as Mashriqa (the easterners), as a counterpoise against the fast growing influence of the Berbers. Only two days after the death of Imam al-Aziz, the Maghriba faction in the army began to raise and stipulated that no one but Ibn Ammar should be the wasita (chief minister). Ibn Ammar negotiated with them, securing their goodwill in exchange for increased payment. Al-Hakim capitulated and responded to their demands, and appointed Ibn Ammar with a title of amin ad-dawla (trustee of the state).
Ibn Ammar intended to establish a purely Berber government in Egypt. His rule, indeed, was characterized by unmasked favourism of the Maghriba. Rudhrawari (d. 488/1095) writes that, "The aim of the Maghriba was to abolish the institution of the Fatimid Imam and build an empire of their own. Ibn Ammar's friends advised him to kill al-Hakim. Ibn Ammar, who intended to follow their advices, but dissuaded later on because al-Hakim was too young and harmless." (cf. "Tajarib al-Umam" by Miskawayh, p. 222). The Berber tribe of Katama, known as Maghriba appears to have been the centres of this change, as they considered that they had been the conquerors of Maghrib and of Egypt, and why should the fruits of this conquest be laid at the feet of an Arab dynasty in the progeny of Ali. Immediately after his appointment, Ibn Ammar began to allocate high positions to his supporters. He dismissed the Turkish and Iranian soldiers, known as the Mashriqa, from the high posts, and restored the power of the Berbers. He also curtailed the power of Abul Futuh Barjawan, the regent of the Imam, and confined him as a tutor of al-Hakim in the palace. The chiefs of Mashriqa thus had been dismissed and some of their supporters were even executed. Annual allowances to them were stopped, and many of them fled from Egypt fearing being killed.
On the day when Ibn Ammar was proclaimed wasita, every Maghriba received 20 dinars, and each was promised an additional 64 dinarsannually. On one occasion, he gave 1500 horses to Katama supporters.