He was the leader (Qaid) of the Zayanes people of Khénifra region. Sultan Moulay Hassan I gave Zayani the title of Qaid in 1886. After the Algeciras Conference (1906), which put Morocco under the French Protectorate, Zayani, at the head of the Zayanes tribe, started a guerrilla war, known as the Zaian War.
He managed to unite several Berber tribes of the Middle Atlas and fought smaller battles.
The town of Khénifra was lost to the advancing French forces in June 1914, but in November of the same year, the battle of Elhri took place and Zayani inflicted heavy losses (around 600 casualties) upon the French military. The battle was later dubbed the "Moroccan Dien Bien Phu".
Despite the victory, Zayani could not secure Khénifra and retired into the mountains. Thus, one of the last pockets of resistance in Morocco was pacified.
Fighting went on, however, until 1932 in the southern High Atlas.
Sometimes also the name Moha/Hammou Ousaid is used (instead of Mouha ou Hamou). He has Ksour named after him in the town of Khénifra and the village Ait Hammou ou Said and a college at the village El Ksiba. His tomb is in Ben Cherro.
His relative is Princess Lalla Latifa Hammou.