A safe bed has been found for a suicidal teenager from Cumbria whose case prompted a High Court judge to issue a scathing assessment of current care provision.

Dr Mike Prentice, medical director for the NHS North Region, said: "Following extensive assessments, the NHS has identified a bed for this young woman in a safe and appropriate care setting which will best meet her needs.

"The bed will be available ahead of the release date."

Sir James Munby, the most senior family court judge in England and Wales, had revealed there were no places available for the girl in an "appropriate clinical setting" when she is released from a secure unit later this month.

The beds were found after Sir James said he felt "shame and embarrassment" that he "can do no more" for the girl, known only as X, in a judgment delivered in private in the High Court family division sitting in Manchester.

Since the judgment, beds were identified in three appropriate care settings and Cumbria County Council held discussions between healthcare professionals and other agencies involved in X's care to establish the appropriate accommodation.

The judgment concerns a girl who has "on a large number of occasions" in a secure unit made "determined attempts to commit suicide".

Staff at the unit where the girl is being held, referred to as ZX, have said sending her back to her home town would be a "suicide mission to a catastrophic level".

Experts believe she needs to be placed in further care following her release, but so far no appropriate bed has been found.

The teenager must leave the unit no later than 3pm on August 14.

In his ruling, Sir James said the case "should make us all feel ashamed".

He said: "For my own part, acutely conscious of my powerlessness, of my inability to do more for X, I feel shame and embarrassment; shame, as a human being, as a citizen and as an agent of the state, embarrassment as President of the Family Division, and, as such, Head of Family Justice, that I can do no more for X.

"If, when in 11 days' time she is released from ZX, we, the system, society, the state, are unable to provide X with the supportive and safe placement she so desperately needs, and if, in consequence, she is enabled to make another attempt on her life, then I can only say, with bleak emphasis: we will have blood on our hands."

Sir James added: "What this case demonstrates, as if further demonstration is still required of what is a well-known scandal, is the disgraceful and utterly shaming lack of proper provision in this country of the clinical, residential and other support services so desperately needed by the increasing numbers of children and young people afflicted with the same kind of difficulties as X is burdened with.

"We are, even in these times of austerity, one of the richest countries in the world. Our children and young people are our future. X is part of our future.

"It is a disgrace to any country with pretensions to civilisation, compassion and, dare one say it, basic human decency, that a judge in 2017 should be faced with the problems thrown up by this case and should have to express himself in such terms."

Labour MP Luciana Berger, who previously served as shadow minister for mental health, branded the case a "life and death situation" and called on Health Secretary Jeremy Hunt to take immediate action.

Sir James ordered that copies of the judgment be sent to the Home Secretary, Health Secretary, Education Secretary and Justice Secretary, as well as the chief executive of NHS England.

A further court hearing is due to take place on Monday.