BEIJING (AFP) - A new law has taken effect prohibiting Chinese from being committed to mental hospitals without their consent in an attempt to prevent "forced detentions", state-run media said on Thursday.

China's first mental health law comes after right groups accused authorities of locking up hundreds of thousands of people in psychiatric hospitals each year, often as a form of punishment for dissidents.

The new regulation, which took effect Wednesday, "aims to stop mental hospitals from admitting patients against their will, a practice that previously triggered public outrage amid accusations of forced detentions", the Global Times said.

It "requires Chinese psychiatric facilities to gain consent from mentally ill patients before taking them in for treatment".

Mental hospitals will also have to obtain patients' permission to administer treatment and respect their requests to be discharged.

The law will not apply, however, to "those with conditions severe enough to warrant guardianship or who have the potential to harm themselves or others", the Global Times said.

The group Chinese Human Rights Defenders said in a report last August that the hundreds of thousands of people committed involuntarily to mental hospitals each year include activists, dissidents and petitioners.

The powerful and wealthy can also abuse the system to lock up opponents, it said, adding that patients are subject to forced medical treatment and physical abuse such as electric shocks.

They are often barred from contacting family members or lawyers and stand little chance of arguing their case in court, the report said.

A psychiatrist quoted in the Global Times called the new measure an important step but questioned how effectively it could be carried out.

The law "does not answer detailed questions such as how to determine the consent of a potentially mentally ill person", it cited Zhang Xinkai, of the Shanghai Mental Health Centre, as saying.