The Berber tribe of the Meknassis (hence the name Meknes) first settled here in the 10th century. Under the Almohads and Merenids, Meknes’ medina was expanded, and some of the city’s oldest remaining monuments were built.
It wasn’t until the 17th century that Meknes really came into its own. The founder of the Alawite dynasty, Moulay Ar Rashid, died in 1672. His successor and brother, Moulay Ismail, made Meknes his capital, from where he would reign for 55 years.
Ismail endowed the city with 25km of imposing walls with monumental gates and an enormous palace complex that was never completed. That he could devote the time and resources to construction was partly because of his uncommon success in subduing all opposition in Morocco and keeping foreign meddlers at bay, mainly because of his notorious Black Guard.
Ismail’s death in 1727 also struck the death knell for Meknes. The town resumed its role as a backwater, as his grandson Mohammed III (1757–90) moved to Marrakesh. The 1755 earthquake that devastated Lisbon also dealt Meknes a heavy blow. As so often happened in Morocco, its monuments were subsequently stripped to be added to buildings elsewhere. It’s only been in the past few decades, as tourist potential has become obvious, that any serious restoration attempts have taken place.
In 1912 the arrival of the protectorate revived Meknes as the French made it their military headquarters. The army was accompanied by French farmers who settled on the fertile land nearby. After independence most properties were recovered by the Moroccan government and leased to local farmers.