Fez or Fes (; Arabic: فاس, romanized: fās, Berber languages: ⴼⴰⵙ, romanized: fas, French: Fès) is a city in northern inland Morocco and the capital of the Fès-Meknès administrative region. It is the second largest city in Morocco, with a population of 1.11 million according to the 2014 census. Located to the north west of the Atlas Mountains, Fez is linked to several important cities of different regions; it is 206 km (128 mi) from Tangier to the northwest, 246 km (153 mi) from Casablanca, 189 km (117 mi) from Rabat to the west, and 387 km (240 mi) from Marrakesh to the southwest. It is surrounded by hills and the old city is centered around the Fez River (Oued Fes) flowing from west to east.
Fez was founded under Idrisid rule during the 8th-9th centuries CE. It initially consisted of two autonomous and competing settlements.