The French conquest of Morocco took place in 1911 in the aftermath of the Agadir Crisis, when Moroccan forces besieged the French-occupied city of Fez. Approximately one month later, French forces brought the siege to an end. On 30 March 1912, Sultan Abdelhafid signed the Treaty of Fez, formally ceding Moroccan sovereignty to France, which established a protectorate. On 17 April 1912, Moroccan infantrymen mutinied in the French garrison in Fez. The Moroccans were unable to take the city and were defeated by a French relief force. In late May 1912, Moroccan forces unsuccessfully attacked the enhanced French garrison at Fez. The last aftermath of the conquest of Morocco occurred in September 1912 when French colonial forces under Colonel Mangin defeated Moroccan resistance at the Battle of Sidi Bou Othman.