The Kingdom of Fez was the name given to the northern part of Morocco, from the founding of the country by the Idrisid dynasty in the 8th century until the establishment of the French and the Spanish protectorate, with its capital at Fez.
Traditionally, the Kingdom of Fez was one of the four States of the King of Morocco, along with the Kingdom of Marrakech, the Kingdom of Sus and the Kingdom of Tafilalet.
It was bounded by the Oum Er-Rbia River and the peaks of the High Atlas to the south, the Atlantic Ocean to the west, the Mediterranean to the north and the Kingdom of Tlemcen then the Regency of Algiers to the east.
The name Kingdom of Fez was sometimes given to all of Morocco when the capital was located in Fes. Today, Morocco is called Fas in Turkish.