In 1912, in consequence of the threatening attitude of the dissident tribes and the generally disturbed condition of the country, the Sultan Abd-el-Hafid had asked France to establish a protectorate in Morocco. The agreement entered into, called the “Convention of Fez,” stipulated that a French Resident-General should be sent to Morocco with authority to act as the Sultan’s sole representative in treating with the other powers. The convention was signed in March, 1912, and a few days afterward an uprising more serious than any that had gone before took place in Fez. This sudden outbreak was due in part to purely local and native difficulties, in part to the intrinsic weakness of the French situation. The French government had imagined that a native army commanded by French officers could be counted on to support the Makhzen and maintain order, but Abd-el-Hafid’s growing unpopularity had estranged his own people from him, and the army turned on the government and on the French. On the 17th of April, 1912, the Moroccan soldiers massacred their French officers after inflicting horrible tortures on them, the population of Fez rose against the European civilians, and for a fortnight the Oued Fez ran red with the blood of harmless French colonists. It was then that France appointed General Lyautey Resident-General in Morocco.
When he reached Fez it was besieged by twenty thousand Berbers. Rebel tribes were flocking in to their support, to the cry of the Holy War, and the terrified Sultan, who had already announced his intention of resigning, warned the French troops who were trying to protect him that unless they guaranteed to get him safely to Rabat he would turn his influence against them. Two days afterward the Berbers attacked Fez and broke in at two gates. The French drove them out and forced them back twenty miles. The outskirts of the city were rapidly fortified, and a few weeks later General Gouraud, attacking the rebels in the valley of the Sebou, completely disengaged Fez.
The military danger overcome. General Lyautey began his great task of civilian administration. His aim was to support and strengthen the existing government, to reassure and pacify the distrustful and antagonistic elements, and to assert French authority without irritating or discouraging native ambitions.
Meanwhile a new Mahdi (Ahmed-el-Hiba) had risen in the south. Treacherously supported by Abd-el-Hafid, he was proclaimed Sultan at Tiznit, and acknowledged by the whole of the Souss. In Marrakech, native unrest had caused the Europeans to fly to the coast, and in the north a new group of rebellious tribes menaced Fez.
El-Hiba entered Marrakech in August, 1912, and the French consul and several other French residents were taken prisoner. El-Hiba’s forces then advanced to a point half way between Marrakech and Mazagan, where General Mangin, at that time a colonial colonel, met and utterly routed them. The disorder in the south, and the appeals of the native population for protection against the savage depredations of the new Mahdist rebels, made it necessary for the French troops to follow up their success, and in September Marrakech was taken.