The fez (Turkish: fes, plural fezzes or fezes, from Arabic Faas " فاس ", the main town of Morocco before 1927), as well as its equivalent, the tarboosh (Arabic: طربوش, Egyptian Arabic pronunciation: [tˤɑɾˈbuːʃ], ALA-LC: ṭarbūsh), is a ), is a felt headdress of two types: either in the shape of a close-fitting skull cap, or a short cylindrical peakless hat made of kilim fabric, both usually red and sometimes with a tassel attached to the top. The tarboosh and the modern fez, which is similar, owe much of their development and popularity to the Ottoman era.
Fez is situated in the Berber lands between the Atlas mountains and the Western Sahara desert which experiences both high wind, and strong sunlight. The traditional local headgear is a light turban that can be pulled over the neck and face to protect the skin.
Because the area is defensible it has been occupied since Roman times, although the modern Islamic city was created by invading Muslims from two opposing settlements around 818 CE.
About 980 CE, the annual hajj for 276 AH was interrupted , so that the pilgrims living west of the Nile were directed to Fez as an alternative Holy City, since by then it already had the notable mosque of Al-Karaouine, which included the madrasa established by Fatima al-Fihri..
Because there were so many visitors a local tradesman in Fez supplied a new "rebellious" style of Persian headdress made of stiff kilim but stained "Islamic red" with a local berry, a colour still evident in the Flag of Morocco. This felt cap proved to be both cheaper and less complicated to wear than the traditional turban (still retained by the rural community ) and became the habitual headgear of "sophisticated" city dwellers.