A family court judge has complained about a council's "mismanagement" of a case centred on the care of a six-year-old girl.
Recorder Carly Henley has published a written ruling in which she criticises a social worker and the social worker's team manager.
She said the case was "deeply troubling" and had been "very badly mismanaged" by the council.
The judge said the girl had been "very badly let down" by the council and by the family court process, and said she hoped that lessons could be learned.
She said she had analysed evidence at a private family court hearing in Newcastle upon Tyne.
The judge has not named anyone involved - she made an order barring journalists from identifying the girl in any report - including the council.
Social services bosses had asked the judge to rule that the girl should be taken from the care of her mother, who is in her early twenties.
Recorder Henley concluded that the girl should be cared for by a relative.
The judge made a series of complaints about the council and staff involved.
She said a social worker's evidence "did not inspire me with any confidence that the care plan being proposed had been properly thought through".
The judge said the social worker's team manager's evidence was "even less impressive".
She said the council had "failed to gather and properly analyse independent evidence".
"This is a deeply troubling case, which has been very badly mismanaged by the local authority," said the judge.
"The local authority has failed to protect (the girl) from harm due to its poor oversight of the case.
"The child has been very badly let down, not only by the local authority and her family but also by the court process."
She said she wanted a copy of her ruling provided to the council's director of children's services and to each member of the care team so that "lessons can be learned".
Copyright (c) Press Association Ltd. 2018, All Rights Reserved. Picture (c) Hugh Macknight / PA Wire.