Map of Atlantic coast of Morocco (1830)
Despite the weakness of its authority, the Alaouite dynasty distinguished itself in the 18th and 19th centuries by maintaining Morocco’s independence while other states in the region succumbed to French or British domination. However, in the latter part of the 19th century Morocco’s weakness and instability invited European intervention to protect threatened investments and to demand economic concessions. The first years of the 20th century witnessed a rush of diplomatic maneuvering through which the European powers and France in particular furthered their interests in North Africa.
French activity in Morocco began during the end of the 19th century. In 1904 the French government was trying to establish a protectorate over Morocco, and had managed to sign two bilateral secret agreements with Britain (8 April 1904, see Entente cordiale) and Spain (7 October 1904), which guaranteed the support of the powers in question in this endeavour. France and Spain secretly partitioned the territory of the sultanate, with Spain receiving concessions in the far north and south of the country.
First Moroccan Crisis: March 1905 – May 1906
The First Moroccan Crisis grew out of the imperial rivalries of the great powers, in this case, between Germany on one side and France, with British support, on the other. Germany took immediate diplomatic action to block the new accord from going into effect, including the dramatic visit of Wilhelm II to Tangier in Morocco on March 31, 1905. Kaiser Wilhelm tried to get Morocco's support if they went to war with France or Britain, and gave a speech expressing support for Moroccan independence, which amounted to a provocative challenge to French influence in Morocco.
In 1906 the Algeciras Conference was held to settle the dispute, and Germany accepted an agreement in which France agreed to yield control of the Moroccan police, but otherwise retained effective control of Moroccan political and financial affairs. Although the Algeciras Conference temporarily solved the First Moroccan Crisis it only worsened international tensions between the Triple Alliance and the Triple Entente.
In 1911, a rebellion broke out in Morocco against the Sultan, Abdelhafid. By early April 1911, the Sultan was besieged in his palace in Fez and the French prepared to send troops to help put down the rebellion under the pretext of protecting European lives and property. The French dispatched a flying column at the end of April 1911 and Germany gave approval for the occupation of the city. Moroccan forces besieged the French-occupied city. Approximately one month later, French forces brought the siege to an end. On 5 June 1911 the Spanish occupied Larache and Ksar-el-Kebir. On 1 July 1911 the German gunboat Panther arrived at the port of Agadir. There was an immediate reaction from the French, supported by the British.