Another close relative of the beret, but even more to the chechia, is the fez. The fez, as well as its Egyptian equivalent the tarboosh. Fezzes come in two types: conical shaped in red felt and cylindrical made of kilim fabric, generally with a tassel attached to the top. The tarboosh is of ancient Greek origin and the modern fez, which is similar, owes much of its development and popularity to the Ottoman era. The immediate origins of the fez are in the Moroccan city of Fez, where Andalusian (Spanish) Moors made these hats in the 17th century.
It was Ottoman Emperor Sultan Mahmud II who in 1826 suppressed the Janissaries and began reforming his military. His modernized army adopted Western style uniforms and he installed the cloth-wrapped fez as their standard headgear, replacing (and banning) the turban. The egalitarian fez became extremely popular, both within the army as with the general population. The fez became a symbol of modernity throughout the Near East.
Almost 100 years later, in 1925, Mustafa Kemal Atatürk banned the use of the fez in his campaign for modernization and secularism in Turkey. Officially, all brimless hats, berets included, all still forbidden headgear in Turkey today!
Somehow, the fez has become adopted by various groups far away from its original home ground. The US based catholic organisation International Order of Alhambra wearing hite fezzes for example, or the, also US based, Ancient Arabic Order of the Nobles of the Mystic Shrine, which has as little to do with Islam and Arabia as Saddam Hussain with weapons of mass destruction.
Tobacco companies adopted the fez in many advertising campaigns, emphasizing the exotic and the Orient of their wares.
British magician Tommy Cooper famously wore a red fez and the Dr Who series contributed immensely to making the fez popular among young people.

About sizes: the fez is worn on top of, not over the head. The sizes provided relate to the wearer's normal head-size, not to the diameter of the fez (which is 2-3cm' smaller in diameter). The fezzes listed at South Pacific Berets are all hand-made in Morocco by small-scale artisan tradesmen. 

$ 47.50 

Moroccan Fez