Image copyright Getty Images Image caption AMs were concerned at suggestions provision was "patchy" around Wales

The number of times police have detained someone under the Mental Health Act has risen by nearly a third in Wales over the last five years.

Better support is needed to avoid a "revolving door" where the same people are repeatedly detained and released, an assembly committee has said.

They said work was needed to find out what was behind the increase.

The Welsh Government said it had provided extra investment to improve access to crisis and out-of-hours care.

The committee chairman, Dai Lloyd AM, called for "consistent services" across Wales.

"Front-line police officers are providing support for individuals who have been in a mental health crisis. However, policing should not be used as a substitute for mental health services," he said.

Under section 136 of the Mental Health Act, police can detain someone and remove them to a "place of safety" if they appear to have a mental disorder and pose a risk to themselves or somebody else.

Three of the four police forces saw a rise, but the committee said poor data meant it was difficult to establish the reasons for this.

The committee said it was "alarmed" the majority of people detained by police under the Mental Health Act were discharged following assessment because they did not need urgent mental health treatment.

This raised questions, AMs said, as to whether they were detained because there was a lack of more appropriate support services.

Image copyright Getty Images Image caption Patients should not be transported in marked police cars but AMs found it was happening routinely

They called for better monitoring of re-admissions and a greater focus on early intervention to avoid repeat detentions.

They were also concerned at suggestions provision was "patchy" around Wales.

Although the numbers of people detained under the Mental Health Act had increased, those being held in police custody has reduced year on year.

The committee said it had been reassured police custody was only used in exceptional circumstances.

Image copyright Getty Images Image caption Police can detain people deemed a risk to themselves or others and take them to a "place of safety"

The committee also said:

Crisis cafes or sanctuaries and additional "out of hours" options should be developed to reduce pressure on the health-based "places of safety"

Individuals and their families needed more guidance on accessing help and support when they realised a crisis was approaching

Patients are routinely transported in marked police cars, even though they are not supposed to be, so there should be a different way of transporting people detained under the Mental Health Act

The four Welsh police forces each run different styles of mental health triage schemes and these should be evaluated to see which works best - the Welsh Government should fund a national model, at an estimated cost of £2.5m.

A Welsh Government spokesperson said it would consider the recommendations and the issue would be a priority in a "mental health delivery plan" for 2019-22, to be published later this year.

Analysis by BBC Wales home affairs correspondent Jenny Rees

Welsh forces have spent £1.2m on improving their response to mental health-related calls, but each takes a different approach.

In 2017 I shadowed a late shift of the mental health triage team in Dyfed-Powys Police, as they faced the challenging task of prioritising calls across a large area.

In this force, a police officer and a nurse will physically turn up to the person in distress in an unmarked van. If they cannot be there in person, they advise colleagues on the ground.

That night they attended a man feeling suicidal and a mum in crisis while her children were taken into care.

The team left once they were stable, with arrangements made for appropriate services to follow up during office hours.

"I didn't join the police to be a mental health worker," the officer told me, but given the volume of mental health-related calls they received, he wanted to make sure the response he provided was a good one.

Today's report calls for additional out-of-hours options to be available to those in a mental health crisis, but we've been here before.

In 2017 Dyfed-Powys Police's chief constable Mark Collins called for more alternative places of safety.

Mental health charities and senior police officers have called for the same over recent years, and while they are being developed in some parts, the provision across Wales is patchy.

Details of organisations which offer advice and support are available on the BBC Action Line. You can call for free, at any time, to hear recorded information 0800 066 066.