Morocco
From Berber Mauretania and the Idrisids to the Alaouite kingdom of the far Maghreb.
Morocco occupies the north-western corner of Africa, a land of indigenous Amazigh (Berber) peoples whose history reaches back to the Mauretanian kingdom and the Roman city of Volubilis. The coming of Islam in the late eighth century produced the Idrisid dynasty and the foundation of Fez, and from the eleventh century the great Berber empires of the Almoravids and Almohads ruled both the Maghreb and Muslim Spain from Marrakesh. After the Marinids and the Saadians—whose victory at the Battle of the Three Kings in 1578 turned back a Portuguese invasion—the Alaouite dynasty came to power in the seventeenth century and rules Morocco to this day. European pressure culminated in the 1912 Treaty of Fez and French and Spanish protectorates, but Sultan Mohammed V led the country to the restoration of its independence in 1956, since when the Alaouite monarchy has governed an independent Moroccan state.