During their history, the Maghariba participated in several military campaigns and played a significant role in the politics of the central government.
[5] Together with the rest of the army, they were granted their own section in al-Mu'tasim's new capital city of Samarra; their allotments were along the Gulf Street (shāri' al-khalīj) adjacent to the bank of the Tigris, and the Azlakh quarter was known as a Maghribi neighborhood.
[13] In 848–49 they were sent by Bugha to help quell a revolt in Adharbayjan,[14] and in 852 they fought in his campaign to defeat Ishaq ibn Isma'il, the rebel governor of Tiflis.
On the day that al-Muntasir was given the oath of allegiance (bay'ah), the Maghariba were employed as riot troops against residents in the capital who opposed the new caliph.
Two thousand Maghariba under the command of Muhammad ibn Rashid al-Maghribi were part of the initial force sent from Samarra to besiege al-Musta'in in Baghdad, and over the course of the war they participated in several battles.
[26] In 870, during the revolt against al-Muhtadi, the Maghariba remained loyal to the caliph; they unsuccessfully defended him against the mutinous Turkish soldiers, and suffered high casualties as a result.
Al-Mu'tamid's brother Abu Ahmad al-Muwaffaq, who became the commander-in-chief of the army, enjoyed strong relations with the Turkish commanders, and under him the Turks came to dominate the military, to the exclusion of the Maghariba and other units.