Fès (fĕs) or Fez (fĕz), Arab. Fas, city (1994 pop. 772,028), N central Morocco. In a rich agricultural region, it is connected by rail to Casablanca, Tangier, and Algeria. The city is noted for its Muslim art and its handicraft industries. It gave its name to the brimless felt caps that were formerly characteristic items of Muslim dress in the Middle East. Fès was the capital of several dynasties and reached its zenith under the Merinid sultans in the mid-14th cent. It declined under the Sa'adi and Filali dynasties, who chose Marrakech as their capital. Fès consists of the still vibrant old city (or medina; founded 808) and the new city (founded 1276), connected by walls. The city has more than 100 mosques; the mosque containing the shrine of Idris II, founder of the old city, is one of the holiest places in Morocco. The Qaraouiyine mosque is the center of a Muslim university that was especially influential in the Middle Ages. Fès is the destination of pilgrims who visit the many tombs of saints and scholars. The ulama, or religious council, of the city often played a role in the selection of the sultans of Morocco.