The cities of Fez, Meknes, Marrakesh and Rabat are collectively known as the imperial cities, and have all, at some point in Morocco’s history, been the capital; Rabat is the current holder. The oldest is Fez, first established as capital in the ninth century under Sultan Idriss II, a great-great grandson of the Prophet Muhammad. After the fall of his dynasty, the Almoravides took over, and Marrakesh became their capital; but Fez remained an important city, and has been capital twice since under different rulers. The Almohads took control in the 12th century and built a new city, Rabat, as their capital; this was replaced, during the rule of Morocco’s notorious sultan, Moulay Ismael, by Meknes. Rabat again became capital under the French protectorate, which began in 1912, and retained the title after independence.