n 1520, there was a famine in Morocco so terrible that for a long time other events were dated by it. It has been suggested that the population of Morocco fell from 5 to under 3 million between the early sixteenth and nineteenth centuries."
Morocco was the first nation to recognize the fledgling United States as an independent nation in 1777. In the beginning of the American Revolution, American merchant ships were subject to attack by the Barbary Pirates while sailing the Atlantic Ocean. On 20 December 1777, Morocco's Sultan Mohammed III declared that the American merchant ships would be under the protection of the sultanate and could thus enjoy safe passage. The Moroccan-American Treaty of Friendship stands as the U.S.'s oldest non-broken friendship treaty.
Successful Portuguese efforts to invade and control the Atlantic coast in the 15th century did not profoundly affect the Mediterranean heart of Morocco. After the Napoleonic Wars, Egypt and the North African Maghreb became increasingly ungovernable from Istanbul, the resort of pirates under local beys, and as Europe industrialized, an increasingly prized potential for colonization. The Maghreb had far greater proven wealth than the unknown rest of Africa and a location of strategic importance affecting the exit from the Mediterranean. For the first time, Morocco became a state of some interest in itself to the European powers.
France showed a strong interest in Morocco as early as 1830. Recognition by the United Kingdom in 1904 of France's sphere of influence in Morocco provoked a reaction from the German Empire; the crisis of June 1905 was resolved at the Algeciras Conference in Spain in 1906, which formalized France's "special position" and entrusted policing of Morocco jointly to France and Spain. The Agadir Crisis provoked by the Germans, increased tensions between European powers. The Treaty of Fez (signed on March 30, 1912) made Morocco a protectorate of France. By the same treaty, Spain assumed the role of protecting power over the northern and southern Saharan zones on November 27 that year.
Many Moroccan soldiers (Goumieres) served in the French army in both World War I and World War II, and in the Spanish Nationalist Army in the Spanish Civil War and after (Regulares).
Under the French protectorate, Moroccan natives were denied their basic human rights such as freedom of speech, the right of gathering and travel in their own country. French settlers built for themselves modern European-like cities called "villages" or "villes" (French for "city") next to poor old Arab cities called "Medinas". The French colonial system forbade native Moroccans from living, working, and traveling into the French quarters. The French education system taught a minority of noble native Moroccan families about French history, art and culture, while disregarding their native language and culture. Colonial authorities exerted tighter control on religious schools and universities, namely "madrassas" and Quaraouaine university. The rise of a young Moroccan intellectual class gave birth to nationalist movements whose main goals were to restore the governance of the country to its own people.
Nationalist political parties, which subsequently arose under the French protectorate, based their arguments for Moroccan independence on such World War II declarations as the Atlantic Charter (a joint U.S.-British statement that set forth, among other things, the right of all people to choose the form of government under which they live). A manifesto of the Istiqlal Party (Independence party in English) in 1944 was one of the earliest public demands for independence. That party subsequently provided most of the leadership for the nationalist movement.
France's exile of Sultan Mohammed V in 1953 to Madagascar and his replacement by the unpopular Mohammed Ben Aarafa, whose reign was perceived as illegitimate, sparked active opposition to the French and Spanish protectorates. The most notable violence occurred in Oujda where Moroccans attacked French and other European residents in the streets. Op