A number of appropriate beds have been identified after a High Court judge 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, had revealed there were 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.
After Sir James's judgment beds were identified in three appropriate care settings.
Dr Mike Prentice, medical director the NHS North Region, said: "The judge is quite right that the relevant agencies need to ensure a safe, new care placement for this young woman, which is suitable given the great complexities of her situation.
"That is what is now happening, and a number of options have now been identified, with detailed clinical and social assessments taking place on Friday to ensure the right package of care can be put in place before her release date."
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.
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."