People with serious mental health problems should be given a host of new rights to ensure they receive better care if they are detained for compulsory treatment, an inquiry ordered by Theresa May has found.

The 50,000 people a year who are sectioned under the Mental Health Act should be able to set out how they want to be looked after and challenge doctors’ decisions about them, said the year-long independent review, led by Prof Sir Simon Wessely, an ex-president of the Royal College of Psychiatrists.

The review said patients detained in a psychiatric unit need a major extension of their rights because being locked up can be “traumatic” and “damaging.”

While patients are well they should be able to spell out what form they want their treatment to take, for example what drugs they wish to receive, in new advanced choice documents that would have statutory force. Any doctor deciding to overrule the patient’s wishes would have to explain why they had done so.

Patients should be able to challenge decisions taken by psychiatrists about their treatment at a tribunal, in the same way that they already can about their detention, the team concluded.

“If there’s one important theme from the whole thing it is to ensure the voice of the patient is heard louder and more distinctly and carries more weight than it has in the past,” said Wessely.

“Even when deprived of their liberty, patients will still have a say in their treatment, with greater and newer protections than they have had before.”

Patients should also be able to get a second opinion about their treatment more quickly and choose a nominated person to be their “nearest relative” to act as their advocate, rather than being allocated one, as at present.

The NHS also needs to hugely expand mental health services outside hospitals, in order to keep patients well and make compulsory treatment a last resort, the inquiry said.

Mental health groups backed that call but stressed that mental health services need to overcome serious financial and staffing problems before that ambition could be realised.

The review has spent the last year examining why growing numbers of people are being detained, the “uncaring” way in which some locked-up patients end up being looked after, and the “unacceptable over-representation” of people from minority ethnic groups, especially those from African and Caribbean backgrounds, among those sectioned under the act.

The Department of Health and Social Care responded to the report by pledging to bring forward some, but not all, of its recommendations in a new mental health bill. That will enact the inquiry’s recommendations on advance choice documents and nearest relative, it said.

“I commissioned this review because I am determined to make sure those suffering from mental health issues are treated with dignity and respect, with their liberty and autonomy respected,” the prime minister said.

“By bringing forward this historic legislation – the new mental health bill – we can ensure people are in control of their care, and are receiving the right treatment and support they need.”