New mental health legislation in Western Australia banning the use of electroconvulsive therapy (ECT) on those under 14 has passed through State Parliament.

The bill has been in the works for about a decade and has been the subject of fierce debate in Parliament since it was introduced last year.

The legislation provides stricter controls on the use of electroconvulsive therapy, also known as electroshock therapy, and aims to give family and carers greater involvement with the treatment of loved ones.

The law imposes a $15,000 fine on anyone performing the therapy on a child under 14.

A child aged between 14 and 18 who is a voluntary patient cannot have the treatment without informed consent and approval by the Mental Health Tribunal.

The Opposition had tried to move an amendment to increase the age restriction to 16, but it was defeated on party lines.

The legislation also prohibits electroconvulsive therapy on adult involuntary patients and mentally-impaired accused, without approval by the tribunal.

Accused people who are mentally impaired are those charged with a crime but found to be unfit to stand trial due to mental impairment or unsoundness of mind.

The implementation of the new laws will be overseen by a reference group, chaired by former Labor leader Eric Ripper.

'No oversight' on ECT before new law

President of the WA Association for Mental Health Alison Xamon said the bill was "long overdue".

"I think it's really important that the bill has improved oversight for a number of treatments, in particular ECT," she said.

"To date there have been no safe guards, and that's been highly problematic, at least now we have some."

She said while there was significant concern about the use of ECT, particularly on young people, many people also relied on the treatment to manage mental health conditions.

"On the one hand, you do want to make sure that there is sufficient oversight, on the other hand, you don't want to make it so stringent that people who really do want these particular treatments just can't get them," she said.

She said the Government would now need to focus on resourcing the provisions within the bill.