China has approved a long-awaited mental health law that aims to prevent people from being involuntarily held and treated in psychiatric facilities, abuses that have triggered public outrage.

Passed by the legislature on Friday, the law standardizes mental health care services, requiring general hospitals to set up special outpatient clinics or provide counseling.

The government has come under public pressure to improve mental health services in response to scandals and rising demand for proper treatment from a society that has grown more prosperous.

In recent years, state media and rights activists have reported cases of people forced into mental hospitals when they did not require treatment. The system has at times been used by authorities to silence dissidents and ordinary people seeking redress to grievances from local governments.