An intense two-day search overseen by a High Court judge to find secure accommodation for a "troubled and dangerous teenager" believed to be involved "in serious gangland activity" has ended in success.
Mr Justice Hayden said the urgent case of 14-year-old F, who cannot be identified for legal reasons, raised "a dilemma you would not expect to see in a mature society in 2017".
But the youth had – after lawyers and "a battery" of social workers from the London borough of Southwark spent hours making phone calls from London's High Court - now been found a placement at a secure unit in Gloucestershire, said the judge.
He welcomed the move and formally made a secure accommodation order authorising F to be taken there.
At the start of the hearing the judge had been told by Southwark there was no secure residential unit anywhere in the country available to take F, whom he described as "emotionally out-of-control" and too dangerous for an ordinary care home.
It is the latest case in which senior judges have raised concern over the issue.
Just a few weeks ago, Sir James Munby, the most senior family judge in England and Wales, expressed "outrage" and said there would be ''blood on our hands'' if a safe placement was not found for a suicidal teenage girl, referred to as X, who could not be sent back to any community setting.
Mr Justice Hayden said: "Sir James described the situation faced by these young people as an 'outrage'.
"I can add nothing to that. Indeed I don't think it is possible to add anything to it.
"I merely agree with it fulsomely."
The judge said he was satisfied that if F, who was both troubled and dangerous, was not held in a secure placement "he is likely to injure himself or other persons".
Making a 12-week secure accommodation order, the judge added: "It is important to remember when lost in the monstrosity of his behaviour that he is still only 14 years of age."
The judge said the initial placement he was being offered was only for two weeks, but the "professional consensus" was that was not long enough and he should remain in secure accommodation for at least 12 weeks.
The teenager was made the subject of a care order in the London borough of Southwark in June.
A consultant psychiatrist described him in April this year as suffering from difficulties stemming from life experiences in his early years and concluded he was at heightened risk of future mental health problems, including developing a personality disorder.
He was also at heightened risk of future offending and substance abuse, said the judge.
Two days before the care order was made F absconded from the care home in which he had been placed and was only found by accident when the police raided a crack den in Peckham, south-east London.
The judge said: "There are real grounds for believing that he is involved in serious gangland activity and that he finds employment as a drugs courier."
F had been investigated for an offence of rape, but that had been discontinued, said the judge.
He already had a conviction related to knives and was facing an appearance before a youth court on two serious charges of robbery.
The judge said the latest crisis over his accommodation came this week when social workers reported him being involved in an altercation around three o'clock in the morning on Thursday with another youth at his care home.
He was reported to have tried to get into the kitchen to retrieve knives "amid much goading about the use of knives".
The judge said F could not go back to that care home, adding: "I fully accept that those working within the unit are genuinely afraid of F.
"He can be a very intimidating individual, although not always and not to everybody."
Because of his concern over the difficulties of finding a placement for F, the judge had given an interim judgment after the first day of the hearing and directed that it be sent to Education Secretary Justine Greening.
The National Secure Welfare Commissioning Unit, which is in charge of secure children's homes, is the responsibility of the Department for Education, said the judge.
In his final ruling on the case, the judge said he had received a communication sent on behalf of Ms Greening saying: "If all else fails, the secretary of state has power to compel a placement."
The judge said he was grateful, but in F's case he had not used the minister's assistance because her offer had been made in relation to a secure unit which it had become clear was unsuitable for F.