
Morocco's strategic location has shaped its history. Beginning with the Phoenicians, many foreigners have come to this area, some to trade or settle, others as invaders sweeping the land and dominating it. Romans, Vandals, Visigoths, and Byzantine Greeks successively ruled the area. Arab forces began occupying Morocco in the seventh century A.D., bringing with them Arab civilization and Islam. Other invasions followed. The Alaouite dynasty, which has ruled Morocco since 1649, claims descent from the Prophet Muhammad.
Morocco's location and resources led to early competition among European powers in Africa, beginning with successful Portuguese efforts to control the Atlantic coast in the 15th century. France showed a strong interest in Morocco as early as 1830. Following recognition by the United Kingdom in 1904 of France's "sphere of influence" in Morocco, the Algeciras Conference (1906) formalized France's "special position" and entrusted policing of Morocco to France and Spain jointly. The Treaty of Fez (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.
France's exile of the highly respected Sultan Muhammad V in 1953 and his replacement by the unpopular Muhammad Ben Aarafa, whose reign was perceived as illegitimate, sparked active opposition to the French protectorate. France allowed Muhammad V to return in 1955, and negotiations leading to independence began the following year.
The Kingdom of Morocco recovered its political independence from France on March 2, 1956. By agreements with Spain in 1956 and 1958, Moroccan control over certain Spanish-ruled areas was restored. Ifni became part of Morocco in 1969.
'