Sidi al-Ayachi

Sidi M'Hamed al-Ayachi (Arabic: محمد بن أحمد المالكي الزياني العياشي; ), also el-Ayachi or al-Ayashi ( – 1641), was a Moroccan marabout, warlord, and jihadist.

Since the death of Ahmad al-Mansur in 1603, Morocco had progressively fallen into a state of anarchy due to his sons fighting for the thrones, it caused a loss of central authority beheld by the Sultan.

[3] With Morocco in a state of civil war, in 1610 to reinforce his power, Mohammed esh Sheikh el Mamun conceded to the Spanish the city of Larache and pledged of their alliance.

[4] The Sultan's seeming inability to defend the country, infuriated Sidi al-Ayachi, and he began a counter-offensive against Spain, privateering against its shipping, and obtaining the help of the Moriscos and the English.

[4] In April 1627, Sidi al-Ayachi revolted against the sultan and attacked the harbour of Salé, which he captured and transformed into his own principality, the Republic of Bou Regreg, becoming its independent governor.