The ancestral know-how had its roots in the era of the Merinid sultans of the 13th century.
Fez - Abdelkader Ouazzani, the last of Morocco's brocade master weavers, has been repeating the same gestures for 63 years in his dilapidated workshop in the heart of the old city of Fes.
"This profession is vanishing... There were many craftsmen in Fes, but they all died and only memories remain," says the 79-year-old weaver, the last witness of a bygone era.
His skillful hands intricately create shimmering silk fabrics, enhanced with gold or silver thread, for bridal jewellery, designer creations or high-end furnishings.
His entire body engages in the delicate job, using a complex drawloom mechanism made up of a large wooden frame topped with beams, rafters, blades, pulleys and counterweights.
His feet rest on the wooden pedals, his shoulders are bent forward, his arms move apart with each launch of the wooden shuttle.
"It's all a question of calculation, each thread takes its path: it's like mathematics," says the old man.
He is secretive about the "rules of the art" which he learnt long ago in his youth, when, he says, "there were no industrial machines" to do the job.
His work is both physical and meticulous: it takes an entire day to weave a metre (three feet) of brocade.
"Not everybody is allowed to see that, it's very special, he is the last man working like that," explains a tour guide who has led a group of Thai tourists here.
They are visiting on the recommendation of the wife of the head of a major Moroccan bank, herself a client of the workshop.
An article in the historical journal "Hesperis", published in 1950 by the Institute of Higher Moroccan Studies, described the weaving of brocades from Fes as a tradition that "disappeared everywhere else in North Africa".
It said that the ancestral know-how had its roots in the era of the Merinid sultans of the 13th century.
"In the 1950s, there were still four or five workshops left," says Mohamed Akhda, the guide in charge of the Thai guests.
"You are now in the last one left in the country."
Ouazzani says he can't find a young apprentice to take over his workshop.
"People no longer want to learn this profession," he says. "No-one cares."
"The future of this refined craft is now threatened," confirms a new panel affixed by the tourist office outside the workshop, hailing Ouazzani as an "undisputed master of the craft".
'Elite of the elite'
As fashions have changed, the wide, colourful belts that for centuries were the pride of the master weavers of Fes gradually stopped selling.
In the age of globalisation, the final blow came with industrial-scale competition. In Fes as elsewhere, some souvenir shops now sell low-end products that are machine woven in China.
Ouazzani, on the other hand, works on commission for a clientele he describes as "the elite of the elite".
His rare fabrics cost up to 5,000 dirhams per metre (about 500 euros, $560), depending on the complexity of the patterns.
A digital tablet he uses to show pictures of his most beautiful pieces - and of his grandchildren - is the only modern object in his workshop that is otherwise crammed with ancient furniture.
On the high walls of the dark room hang framed diplomas and faded pages from fashion magazines.
The master hides his most cherished "treasures" in a small wooden cupboard protected by a dusty tablecloth.
With an expansive gesture, he unfolds his "catalogue", a 16-metre-long roll of fabric with motifs that range from the Hispanic-Moorish tradition to Oriental art or European designs.
"This one I made for Colette," says the weaver, showing a photo of a caftan with a purple geometric pattern on a black background.
His pride and joy, the exquisite work was displayed in the window of the famous French boutique which until its closure in 2017 was one of the most popular addresses in chic Paris.