A High Court judge has warned "we will have blood on our hands" if care is not found for a suicidal teenager upon her release from a secure unit.
Sir James Munby, the most senior family court judge in England and Wales, revealed there are no places available for the girl in an "appropriate clinical setting" when she is freed in 11 days.
He 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.
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.
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.
Sir James said the only placement identified as an option for the girl has a six-month waiting list for beds, and hit out at the "disgraceful and utterly shaming lack of proper provision" of support for vulnerable people in the country.
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."
It comes as a BBC investigation revealed some mental health patients across the UK are waiting for years to be discharged.
Shadow mental health minister Barbara Keeley said the delays were a "scandal" and meant "other people who urgently need to access mental health services are not able to get the treatment they need".
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.
Ms Berger, who sits on the health select committee and is president of Labour's campaign for mental health, said the details of the case were "harrowing" and "a reflection of the imbalance with which we treat mental health in this country".
She told the Press Association: "We would not be having this conversation if we were talking about physical health.
"This is a life and death situation here, this vulnerable young person is in a life-threatening situation and it should be treated as such."
She added: "Jeremy Hunt needs to act today.
"This young person and countless other young people across our country cannot afford to wait."
Conservative MP and former children's minister Tim Loughton wrote: "This is worrying and very significant from James Munby who is widely respected."
A spokesman for NHS England said: "We have heard the comments from the judge and completely agree that a solution must be found.
"Together with other agencies involved, we are continuing to make every effort to find the most appropriate care setting for this young woman."