A High Court judge has criticised the "serious failings" of a Welsh council in its treatment of a looked-after teenager while he was in prison.
Mr Justice Munby told the court last week there was "confusion" over the role of the 18-year-old's personal adviser and said Caerphilly Council had embarked on a pathway plan for the teenager far too late.
He described the steps taken to involve the teenager in the process as "inadequate".
Justice Munby said that the man, who was taken into care in 2001 and had had repeated periods in secure accommodation, had been unco-operative but said that was no reason for the council not to carry out its obligations.
The Howard League for Penal Reform, which backed the judicial review challenge, described the judge's ruling as landmark.
Chris Callender, head of the league's legal team, said: "This judgement will send out a message to all local authorities that assessment and planning is not simply about ticking boxes but a thoughtful and detailed process helping children to map out their future."
A spokesperson for the council said: "We recognise the criticisms and the need to improve our processes which will help us avoid situations like this reoccurring in the future."
World class commissioning learning resource
28 November 2008
Baby P case in Haringey
18 November 2008
Sharon Shoesmith removed after 'devastating' inspection report
Urgent Baby P report now with ministers
Adult star ratings: Councils improve for sixth year running
Review delivers damning verdict on Haringey child protection
Government Legislation
02 December 2008
Details of government consultations
28 November 2008
Private Member Bills
21 November 2008