The Algeciras Conference of 1906 took place in Algeciras, Spain, and lasted from 16 January to 7 April. The purpose of the conference was to find a solution to the First Moroccan Crisis of 1905 between France and Germany, which arose as Germany responded to France's effort to establish a protectorate over the independent state of Morocco. Germany was not trying to stop French expansion – its goal was to enhance its own international prestige, and it failed badly. The result was a much closer relationship between France and Britain, thus strengthening the Entente Cordiale, with both London and Paris increasingly suspicious and distrustful of Berlin. An even more momentous consequence was the heightened sense of frustration and readiness for war in Germany. It spread beyond the political elite to much of the press and most of the political parties except for the Liberals and Social Democrats on the left. The Pan-German element grew in strength and denounced their government's retreat as treason, stepping up chauvinistic support for war. 
Britain and France's Entente Cordiale of 1904 had defined diplomatic cooperation between them and recognized British authority over Egypt and French control in Morocco (with some Spanish concessions). Germany saw this development putting an end to the rivalry between Britain and France, which would further isolate Germany in European affairs.
On 31 March 1905, Germany's Kaiser Wilhelm II visited Morocco's capital, Tangier, and delivered a sabre-rattling speech calling for an international conference to ensure Morocco's independence, with war the alternative. Historian Heather Jones argues that Germany's use of warlike rhetoric was a deliberate diplomatic ploy:
German diplomats believed they could convince U.S. President Theodore Roosevelt to challenge French intervention in Morocco. Roosevelt — at that time mediating the Russo-Japanese War, and aware of the U.S. Senate's stance to avoid involvement in European affairs — was disinclined to become involved in the Moroccan crisis. However, with the situation in June 1905 worsening to the point of war between Germany and France (and possibly Britain), in July Roosevelt persuaded the French to attend a January peace conference in Algeciras.
Germany had hoped that the Conference would weaken the entente cordial. Wilhelm II had thought he could form an alliance with France, if most of their demands were met. He also thought that better relations with Russia were possible, due to the Revolution of 1905 and Russo-Japanese War putting them in a weak, ally-hungry position. However, due to Germany being somewhat excluded in the initial decisions, and Britain's Foreign Secretary Sir Edward Grey showing Britain's support of France in the Conference via meetings with French ambassador Jules Cambon, the Entente Cordiale actually grew stronger.
Following their failed attempt to isolate Britain, Germany furthered the growing Anglo-German Naval Race with passage of the Third Naval Law in 1906. The overall contribution towards the outbreak of the First World War can then seen to be the separation of Germany and her allies (Triple Alliance) and Britain, France and Russia, who in the following year would become the Triple Entente. The next major event to thicken the tension between these two would be the Bosnian Crisis.
The final Act of the conference of Algeciras, signed on 7 April 1906, covered the organisation of Morocco's police and customs, regulations concerning the repression of the smuggling of armaments, and concessions to the European bankers from a newly formed State Bank of Morocco, issuing banknotes backed by gold, with a 40-year term. The new state bank was to act as Morocco's Central Bank, with a strict cap on the spending of the Sherifian Empire, and administrators appointed by the national banks which guaranteed the loans: the German Empire, United Kingdom, France and Spain. Spanish coinage continued to circulate. The right of Europeans to own land was established, whilst taxes were to be levied towards public works.
The Sultan of Morocco retained control of a police force in the six port cities, which was to be composed entirely of Moroccan Muslims (budgeted at an average salary of a mere 1000 pesetas a year) — but now to be instructed by French and Spanish officers, who would oversee the paymaster (the Amin), regulate discipline, and could be recalled and replaced by their governments. The Inspector-General in charge would be Swiss and reside in Tangiers.