Black Guard

[2] They were called the "Slaves of Bukhari" because Sultan Isma‘il emphasized the importance of the teachings of the famous imam Muhammad al-Bukhari, going so far as to give the leaders of the army copies of his book.

[2] At age 10, children began to be trained in certain skills: the girls in domestic life or entertainments, and the boys in masonry, archery, horsemanship, and musketry.

[2] Considered more loyal than the local Arabs or Berbers because of their lack of tribal affiliation, Isma‘il's black soldiers formed the bulk of his standing army and numbered 150,000 at their peak.

[6][4] Ruling from a new capital at Meknes, he distinguished himself as a ruler who wished to establish a unified Moroccan state as the absolute authority in the land, independent of any particular group within Morocco – in contrast to previous dynasties which relied on certain tribes or regions as the base of their power.

[6][4]: 231  In 1699, he gave orders to enslave all black Africans in Morocco, even those who were born free or who were Muslim, and, consequently, he violated two of the central tenets of Islamic law concerning slavery.

[11] In a study of these events, scholar Chouki El Hamel argues that Isma'il's efforts to justify these actions generated a potent new form of racist discourse in the region that associated black Africans with slavery.

The Black Guard were the personal guard and servants of Sultan Isma‘il, they might have also participated in campaigns against the European-controlled fortress enclaves dotting his empire's coast (such as Tangier, taken over after the English withdrew from it and distressed it in 1684 in response), although tasks of this kind were often allocated to European slaves (called ‘aluj Arabic: العلوج, plural of ‘alj, meaning "white Christian slave") and loyal Moroccan tribal soldiers, considered more military and cavalry-able.

[2] After Isma‘il's death in 1727, the ‘Abid played a key role in the political turmoil that engulfed Morocco, frequently shifting allegiance between different claimants to the throne.

[16] Many of the 'Abid had by then deserted their contingents and joined the common population of the country, and Mohammed III was able to reorganize those who remained into his own elite military corps.

During the later years of his reign, as he faced mounting rebellions and crises, Slimane sought to revive Isma'il's military policies and to re-enlist the Haratin (free black people) into the army.

[6]: 231  Slimane's successor, Abd ar-Rahman, also attempted to re-enlist black soldiers in order to strengthen the military in response to the French conquest of Algeria that began in 1830.

[6]: 233–235  However, after the defeat at the Battle of Isly (1844) and as contacts with Europe increased over the rest of the century, later 'Alawi sultans attempted to reform the military into a "modern" standing army with salaried soldiers instead of the traditional tribal levies.

Ba Ahmed himself acted as de facto ruler of Morocco during the first four years of the reign of 'Abd al-Aziz (r. 1894–1908), whom he helped install on the throne.

Moroccan Black Guards in 1926