The country has used kaftan for many years before the rise of the Ottoman Empire, most properly inherited it from the Asiatic merchants of Andalusia who fled to Morocco. Kaftan was tailored and re-fashioned by Moroccan clothes makers (locally called "Maalem") during the Marinid Dynasty and was usually worn by the kings of the region. It was later adopted by the wider public as a form of dress during the Saadian Dynasty, and is worn till this day in Algeria and Tunisia too, though the tunic was said to be spread there by the Ottomans
Historically, there are many Moroccan Kaftans, and their use depends on the cities on which they are worn such as Tetouan, Fes, Rabat, Sale and Marrakech. They can be made of brocade, velvet, silk and many other fabrics Kaftans can be worn on both casual and formal occasions. More ewxpensive materials are used for formal and elegant situations.