Casablanca - Rows of women in light-blue overalls, their hair tied neatly under white caps, sew strips of beige material at furious speed.
Few look up from their work to glance at the occasional visitors touring the shop floor at Abdelkhalek Chraibi's trouser factory.
Chraibi says his operation has never been so efficient, but this is no time to relax.
'China can't fulfil just-in-time orders for Europe'
Times have been hard since the opening of European markets last year to Asian firms, who have lured clients from Moroccan rivals let down by weaker logistics, reliability and costs.
Morocco's proximity to Europe remains a trump card, provided it can reach the productivity levels needed to win work from European clothing firms able to pick and choose from an increasingly global slate of suppliers.
Chraibi is determined to be one of the survivors.
At his factory new, computerised sewing machines stitch fabric together in record time.
His women are trained to perform at least five different tasks, making production methods more flexible and avoiding production stoppages due to illness.
"Once I had 12 girls doing 100 pockets per hour," says Chraibi.
"Now I have one girl doing 200 pockets per hour."
Chraibi says only around 5 to 7 percent ends up as profit these days, compared to up to 30 percent in the past, a sign of how competitive the market has become.
Last year, Morocco saw textile exports tumble after European quotas for African producers, which in effect barred Asian manufacturers from the European market, were mostly removed.
The crisis showed Morocco's reliance on Europe, which takes 92 percent of its textiles, and raised fears for the future of a sector which accounts for 40 percent of manufacturing sales abroad and employs 40 percent of the manufacturing workforce.
Just-in-time
In recent months, however, exports have begun to recover and comments from some manufacturers suggest order books are refilling as customers in Britain, Spain and France realise Morocco offers one big advantage - proximity.
"China can't fulfil just-in-time orders for Europe as it's too far and fuel costs are too high," says Lamiya Ismaeli, head of textiles and leather at the industry and trade ministry.
Tailored clothing exports grew 12,3 percent and hosiery 9,6 percent in the first five months of the year but were still down three percent and 15 percent respectively from 2004.
Industry observers say Morocco's position on Europe's doorstep means it can only benefit from ever-shorter delivery schedules, but to do that, it must get on top of its game.
"Everyone is chasing the minute that risks being lost, every second. Everyone is becoming more conscious of reactivity," says Chraibi, who is also head of institutional and social relations at national textile lobby Amith.
The stakes are high as the textile sector represents 9 billion dirhams, or 4 percent of gross domestic product in a country struggling with unemployment and poverty.
Investment incentives
To encourage big brands like Levi Strauss, Diesel and Zara to make Morocco one of their main supply bases, the government is offering to part-fund new investments and has slashed duties on imports of raw materials and accessories.
A new port opening next year in Tangier will offer cheaper transit to Europe and the United States and a free trade zone nearby will allow firms to import material and re-export finished clothes free of tax.
And in an unusual twist, analysts say the biggest threat to Morocco's textile trade may hold a key to its future success.
Chinese firms may soon set up shop in Morocco to be closer to European clients and lap up US import quotas that Morocco won recently under a free trade deal.
Officials say the sector could achieve 40 billion dirhams of exports within five years, up from 24,25 billion in 2004.
However, problems still dog the industry.
Most Moroccan textile employees work illegally, receiving wages in cash from firms that keep no records of working hours.
That has turned into a big competitive disadvantage now that ethically-minded Western shoppers look more than ever at who made their clothes and under what conditions.
At the other end of the scale, firms that play by the rules complain of being hamstrung by time-consuming administrative procedures and rigid labour rules.
Two years ago, Morocco increased its minimum wage and cut the working week.
"Then they introduced mandatory health insurance which puts another five percent on your overheads," says John Reynolds, a partner in JC Services, a small firm near Rabat that makes boiler suits, chefs jackets and other workwear for Britain.
"It all adds up to make Morocco very unattractive to foreign investors."
In the meantime, he says, a few simple reforms would make his life a lot easier.
"They could put together a booklet on how to start a factory here rather than making you run round three offices gathering paperwork."