Sharon Shoesmith has won her Court of Appeal battle over her sacking following the Baby P tragedy.
Three judges allowed Ms Shoesmith's challenge against a High Court ruling that cleared former children's secretary Ed Balls and the local authority of acting unlawfully when she was dismissed as director of children's services at Haringey Council in north London.
The high court ruled that Ed Balls – children's secretary at the time of her dismissal – had failed to give Shoesmith the opportunity to defend herself from criticisms in a specially commissioned Ofsted report .
Balls used the report to support his dismissal of her at a live TV press conference in December 2008. In its ruling the court said: "She was denied the elementary fairness which the law requires."
The court also upheld her appeal against Haringey council, which formally sacked Shoesmith a week after Balls removed her. The ruling said the council's procedures were "tainted by unfairness".
Shoesmith said after the hearing: "I'm over the moon. Absolutely thrilled. I am very relieved to have won my appeal and for recognition I was treated unfairly and unlawfully." But she added that the sorrow of the child's death would "stay with me for the rest of my life".
An attempt by Shoesmith to quash an Ofsted report into the case was rejected, however. The ruling said Ofsted had complied with the requirements of the statute and of the common law.
Her appeal against regulator Ofsted was dismissed.
Peter had been seen by health and social services professionals 60 times in the eight months before he died.
Ms Shoesmith, 58, had asked the appeal court to rule that her sacking was so legally flawed as to be null and void.
Her defence counsel said that the "media storm" following the criminal trial meant Ms Shoesmith had been unable to find to find a job since December 2008 and she experienced suicidal thoughts.
The appeal judges were told of the "catastrophic" personal impact on Shoesmith following Baby P's death. Maurici said she had been unable to find any work since December 2008, experienced suicidal thoughts, and was still regularly hounded and vilified by the tabloid press.
James Eadie QC, appearing for the government, defended Balls's actions to the appeal court, saying urgent action had to be taken following Ofsted's "ghastly findings", which uncovered "dangerous" failings in Shoesmith's department that threatened local and national confidence in effective child protection.
Ofsted chief inspector Christine Gilbert welcomed the ruling, saying: "I am pleased that Ofsted has comprehensively won this case and that the original judicial review judgement in our favour has been upheld in every aspect on appeal.
Ofsted carried out a robust inspection and came to a sound conclusion based on evidence. On any view, our inspection report was extremely critical and there has been no challenge to the finding that services for children in Haringey were inadequate. The fairness of our process and rigour of our inspection has now been confirmed through the scrutiny of not just one, but two court hearings.
The most important thing, of course, is that Haringey's children's services are now much improved as a result and that children are better protected.