However, the US State Department proposed the creation of international agreements to prevent that from happening and to ensure the maintenance of treaty rights. So, in 1880, the major European nations and the United States decided to preserve the territorial integrity of Morocco and to maintain equal trade opportunities for all. The agreement, signed in Madrid in 1880, gave Germany the right to be consulted on any change in the status of Morocco. Germany, like the other powers, were interested in trade with Morocco and especially interested in Morocco’s iron ore. They preferred an “open door” policy similar to that which the Western powers and Japan had in China.
Alas, the friendly terms of the Madrid Agreement were too good to be true for the greedy days ahead, and in October of 1904, France and Spain signed a treaty which appeared to guarantee Morocco independence but had a secret clause that divided Morocco into French and Spanish zones, with France controlling almost all of Morocco and Spain controlling the small southwest portion, known as Spanish Sahara. To compound matters, they next secretly agreed with Great Britain (the Entente Cordiale) not to oppose British aims in Egypt in exchange for a free hand in Morocco.
The European powers had a long-standing agreement to confer with each other about dividing up lands as far back as 1878, and by ignoring Germany in this matter, it caused grave consternation in the Fatherland. In 1905, after France had asked the sultan of Morocco for a protectorate, Kaiser Wilhelm II visited Tangier and declared support for Morocco’s integrity.
President Theodore Roosevelt intervened in this dispute and at German insistence, the Algeciras Conference was called in 1906. The Act of Algeciras offered a compromise that guaranteed equality of economic opportunity and the Open Door policy. The sultan of Morocco maintained control over his lands, France’s privileges were somewhat curtailed and German investments were assured protection. England and Germany favored internationalization of Tangier, which overlooks the Strait of Gibraltar, but France resisted this proposal, insisting that French and Spanish predominate. France and Spain also secured crucial privileged positions with the Moroccan police force. Meanwhile, the British were, like the French, overly sensitive to any attempt by Germany to establish any sort of permanent naval facility in the Mediterranean.
The agreement fared even worse than the Madrid Agreement in 1880 had, and immediately following the Act of Algeciras, France took steps to establish a protectorate over Morocco. The French had steadily annexed territory, and in 1908, friction arose at French occupied Casablanca when the German consul gave refuge to deserters from the French Foreign Legion. This dispute was settled by the Hague Tribunal in Germany’s favor. Shortly afterward, Abd al-Aziz IV was unseated in a coup and his brother, Abd al-Hafid, installed on the throne and received help from France and Spain, especially in a revolt that broke out in 1911.
In response to these events, Germany dispatched a gunboat, the Panther, to Agadir on July 1, 1911, and a second Moroccan crisis ensued. Again, a compromise was reached in the form of the Franco-German Accord of November 1911 whereby Germany gave France a free hand in Morocco in exchange for a portion of the French Congo. France also agreed to cooperate in the creation of an international regime for Tangier. A statute was finally approved by most of the Algeciras powers by November, 1914.