Fez is the oldest imperial city in Morocco, namely that it is located between the lands of Saïss and the forests of the Middle Atlas. It was founded by Idriss 1 on the right side of the Fez River in 789. 20 years later his son Idriss 2 took the other side of the river to build the upper city. They both received Muslim refugees in 818, from Cordoba and Kairouan in Tunisia. Both cities have contributed over time to the Arabization and Islamization of Morocco. The foundation of its university, helped it to become an economic metropolis, and in 1250 it was elevated to the rank of imperial city by the Merinids.
It was conquered by the Alawites in 1666 to be rejected by Moulay Ismail having a preference for Meknes. In the 20th century, in 1912 the new city was built under the protectorate and welcomed prosperous citizens while Fez el Bali was inhabited by poor citizens. Fez is therefore the religious and spiritual capital of Morocco, and has contributed to Moroccan history. Today it is considered a World Heritage Site by UNESCO and has been since 1981.