A "troubled" 16-year-old girl will have to wait more than a month before she can be admitted into a secure accommodation unit because of the lack of placements available, a court has heard.
The teenager, who cannot be identified for legal reasons, is currently being housed in an unsuitable residential unit in Wales, where she will have to remain until the secure placement - which a High Court judge said everyone agreed was in her best interests - becomes available.
At an earlier hearing Mr Justice Francis ordered the secretary of state for education Damian Hinds, or an appropriately appointed representative, to appear before the court to explain why a place in a secure accommodation unit had not been found.
He said the Government had a duty to provide secure accommodation for youngsters such as the girl - and he wanted to know why that duty had not been discharged.
Sitting at the Cardiff Family and Civil Justice Centre (pictured) on Monday he said since then an issue had arisen about whether it was the Welsh Government, the UK Government's Department for Education or "some other body" that bore the responsibility in the case.
"I had thought at one stage that there was going to be an issue and indeed it did appear there was an issue with one department blaming another," he said.
"Happily there has been a considerable coming together of minds and everybody working together to see what they can do in the interests of this young woman."
The judge added that in the future it may become necessary for him or another judge to resolve the issue of responsibility under the devolution settlement.
The court heard a secure placement had been found for the girl but that it but would not be available until April.
In the meantime the health board had agreed to continue looking after her, despite the placement being unsuitable.
Matthew Rees, who represents the teenager's court-appointed legal guardian, said the girl was in "limbo" and "that's what makes the situation so unsatisfactory".
Mr Justice Francis, who is the is the latest in a series of judges to raise concern about a shortage of secure accommodation places for teenagers in England and Wales, said the local authority involved should do "everything in their power" to try to find the girl an earlier placement.
Sir James Munby, president of the Family Division of the High Court, said in October 2016 that the problem had led to social services bosses at English councils trying to place children in secure accommodation units in Scotland.
Mr Justice Francis said that with "four separate government-funded authorities working together" he did not want to appoint blame but said that the number of hearings in the matter, each with at least 15 people in court, had come at a considerable cost to the public.
He said this had led to a "waste of public money", the loss of court time and the unavailability of accommodation at the location where the girl was currently staying because "it's being occupied by somebody who should not be there".
"I know that (this girl) is not the only person in this country that is suffering from a lack of placements," he added.
Mr Justice Francis asked the case to be listed for a mention hearing in the next two weeks on a date to be fixed, which he said could be cancelled if there were no further issues.
Copyright (c) Press Association Ltd. 2018, All Rights Reserved. Picture (c) PA Wire.