Fes el Bali is a UNESCO World Heritage Site.
Fes or Fez (Arabic: فاس Fās, Tifinagh: ⴼⴰⵙ) is the second largest city of Morocco, after Casablanca, with a population of approximately 1 million (2010). It is the capital of the Fčs-Boulemane region. Fes, the former capital, is one of the country's four "imperial cities," the others being Rabat, Marrakech and Meknes. It comprises three distinct parts, Fes el Bali (the old, walled city), Fes-Jdid (new Fes, home of the Mellah) and the Ville Nouvelle (the French-created, newest section of Fes).
Fes el Bali (Arabic: فاس البالي) (English: Old fes ) is the oldest and walled part of Fes. Besides being famous for having the oldest university in the world, Fes el Bali, with 9600 streets and a total population of 156 000, is also believed to be the world's largest contiguous car-free urban area. The University of Al-Karaouine, founded in AD 859, is the oldest continuously functioning university in the world. The city has been called the "Mecca of the West" and the "Athens of Africa".
The city was founded on a bank of the Fez River by Idris I in 789, founder of the Zaydi Shi'ite Idrisid dynasty. His son, Idris II (808), continued the building on the opposing river bank. Arab emigration to Fes, including 800 Al-Andalusian families expelled after a rebellion in Córdoba in 817–818, and other 2,000 families banned from Kairouan (modern Tunisia) after another rebellion in 824, gave the city a definite Arab character. 'Adwat Al-Andalus and 'Adwat al-Qarawiyyin, the two main quarters of Fes, got their names after these two waves of Arab immigrants to the new city. During Yahya ibn Muhammad's rule the Kairouyine mosque, one of the oldest and largest in Africa, was built, together with the associated University of Al-Karaouine was founded (859).
After Ali ibn Umar (Ali II) came to power, the Berber tribes of Madyuna, Gayatha and Miknasa, which were Sufrite Kharijites, formed a common front against the Idrisid. When they had defeated Ali's armies, they occupied Fes. They were driven out of the city by Yahya ibn Al-Qassim, who declared himself Ali's successor. The city was populated by Muslims from elsewhere in North Africa and the Middle East, Moriscos (especially after the Spanish conquest of Granada in 1492). Many Jews did also settle in the city, in their own quarter, the Mellah. Before that, most of the city's population was of Berber descent, with rural Berbers from the surrounding countryside settling the city throughout its history, mainly in the Andalusian quarter and later in the 'new city' of Fes.
The two halves of Fes were united in 1069, after the destruction of the wall dividing them. Although the capital was moved to Marrakech and Tlemcen under the Almoravids, Fes remained the scientific and religious center, where both Muslims and Christians from Europe came to study. In 1250 it temporary regained its capital status under the Marinid dynasty.