Zaian War: Berber tribesmen inflict the heaviest defeat of French forces in Morocco at the Battle of El Herri.

The Battle of El Herri (also known as Elhri) was fought between France and the Berber Zaian Confederation on 13 November 1914. It took place at the small settlement of El Herri, near Khnifra in the French protectorate in Morocco. The battle was part of the Zaian War, in which the confederation of tribes sought to oppose continued French expansion into the interior of Morocco. Having captured the strategic town of Khnifra earlier in the year, the French, under General Hubert Lyautey, entered negotiations with Mouha ou Hammou Zayani, who led the Zaian. Lyautey thought that peace could be achieved and ordered Lieutenant-Colonel Ren Laverdure, who commanded the garrison in Khnifra, not to launch any offensives.

Laverdure became frustrated with the lack of action and, on 13 November, led almost his entire garrison in an attack on the Zaian encampment at El Herri. The attack initially went well, with his artillery and cavalry clearing the tribesmen from the camp, looting the Zaian tents and capturing two of Hammou's wives. However, the French encountered a significant Zaian force during its withdrawal to Khnifra. This force engaged the French with harassing fire, forcing them to move only under the cover of their artillery. Laverdure then ordered his wounded back to Khnifra with a guard of a company of infantry, which were joined by large numbers of other troops who broke ranks to join the column. Whilst making a river crossing, Laverdure's rear guard and artillery were overrun and annihilated. Laverdure's remaining troops then formed square and fought a desperate last stand against several thousand tribesmen before they were also overrun and killed.

The French losses were significant: some 623 North African, Senegalese and French soldiers (including Laverdure) were killed and 176 wounded. The Zaian lost at least 182 men killed. The column of wounded reached Khnifra just ahead of pursuing Zaian forces and the town came under siege. Lyautey was dismayed at Laverdure's actions and was briefly of the opinion that he had cost him the war. However, a relief force reached Khnifra within a few days and the situation stabilised. The Zaian War lasted until 1921 when negotiations secured the submission of much of the confederation to French rule and a military offensive pushed the remainder into the High Atlas mountains.

The Zaian (or Zayan) War was fought between France and the Zaian confederation of Berber tribes in Morocco between 1914 and 1921 during the French conquest of Morocco. Morocco had become a French protectorate in 1912, and Resident-General Louis-Hubert Lyautey sought to extend French influence eastwards through the Middle Atlas mountains towards French Algeria. This was opposed by the Zaians, led by Mouha ou Hammou Zayani. The war began well for the French, who quickly took the key towns of Taza and Khénifra. Despite the loss of their base at Khénifra, the Zaians inflicted heavy losses on the French, who responded by establishing groupes mobiles, combined arms formations that mixed regular and irregular infantry, cavalry and artillery into a single force.

The outbreak of the First World War proved significant, with the withdrawal of troops for service in France compounded by the loss of more than 600 French killed at the Battle of El Herri. Lyautey reorganised his available forces into a "living barricade", consisting of outposts manned by his best troops protecting the perimeter of French territory with lower quality troops manning the rear-guard positions. Over the next four years the French retained most of their territory despite intelligence and financial support provided by the Central Powers to the Zaian Confederation and continual raids and skirmishes reducing scarce French manpower.

After the signing of the Armistice with Germany in November 1918, significant forces of tribesmen remained opposed to French rule. The French resumed their offensive in the Khénifra area in 1920, establishing a series of blockhouses to limit the Zaians' freedom of movement. They opened negotiations with Hammou's sons, persuading three of them, along with many of their followers, to submit to French rule. A split in the Zaian Confederation between those who supported submission and those still opposed led to infighting and the death of Hammou in Spring 1921. The French responded with a strong, three-pronged attack into the Middle Atlas that pacified the area. Some tribesmen, led by Moha ou Said, fled to the High Atlas and continued a guerrilla war against the French well into the 1930s.