LABOUR conditions in China can be notoriously lousy. Reports abound of sweatshops, workers' protests and this year even of officials condoning the luring of children into slavery. A new law on employment contracts, coming into effect on January 1st, will in theory improve workers' lots, but is creating more headaches.

The law is supposed to provide greater job security. Workers with ten years or more of service will have open-ended contracts and companies will have to inform unions before sacking anyone. Employers fear the law will mean bigger severance payments. The unions will also have the power to negotiate collective contracts.

But the law has many detractors. Some allege it will take China back to the “iron rice bowl” era of Maoist days when jobs were for life and the economy was crippled by a lack of incentive. Others, conversely, argue that it will strengthen state-controlled unions but do little for downtrodden workers.

Both sides agree it has loopholes, which companies have been racing to exploit. The Chinese press has cited numerous attempts by enterprises to circumvent the law. Huawei, China's best-known maker of telecommunications equipment, has attracted special notice. It has been accused of asking some 7,000 employees with more than eight years of service to resign to compete for new short-term posts. The aim, allegedly, was to reclassify them as new employees.

The new law has been a boon to the All-China Federation of Trade Unions (ACFTU), an umbrella for all China's unions that is in effect an arm of government. In recent years it has seen its power eroded as state-owned industries have collapsed and the private sector has flourished, eschewing niceties such as unions and Communist Party cells.

After persuading Huawei, which denied trying to evade the law, to revise its plans, the ACFTU this week issued a stern warning to other companies not to try anything similar. It said a “small number” were laying off large numbers of workers in advance of the new law. This, it said, was threatening the success of efforts to build a “socialist harmonious society” and should be “resolutely stopped”.

But for all the ACFTU's propaganda, few expect it to emerge as a strident new champion of workers' rights. Independent trade unions will remain in effect illegal. China has no plans to reintroduce the right to strike, which it abolished in 1982 as it began to fret about the example set by the Solidarity trade-union movement in Poland. The role of the ACFTU, in the government's eyes, is to prevent worker unrest.

One of the main aims of the new law is to counter the widespread complaints in China that the country has been over-zealous in its embrace of capitalism. These complaints became particularly shrill in June, after reports emerged that local officials in the northern province of Shanxi had allowed rural brick kilns to lure hundreds of people, including children, to work in slave-like conditions. The new law had been publicly debated long before the scandal surfaced. But its critics say the government rushed to push it through the rubber-stamp legislature in June in order to assuage public anger over the kilns.

One of the law's most outspoken critics is Dong Baohua of the East China University of Political Science and Law, who helped draft China's first labour law in 1994. Among Mr Dong's complaints is that the new law does nothing to improve the lot of tens of millions of migrant workers from the countryside. They make up most of the unskilled labour in urban areas and are the most frequent victims of poor labour conditions. China's official trade unions have yet to build a network among such workers. Nor will the law help people such as Shanxi's slaves, who suffer not from a lack of legal protection but from poor enforcement. Mr Dong also says the new law will not cut the number of labour disputes, which have become increasingly common in recent years (see chart).

For all the ACFTU's fulminations, critics say many companies will continue efforts to evade the law or else simply ignore it. But in an interview published by one of China's biggest-circulation newspapers, Southern Weekend, Mr Dong argued that China could also end up like France, with its economy numbed by costly employment benefits and strikes triggered by any effort to reform them. That, he said, would be the “most terrifying” outcome for China. The party would agree.