When Mrs Justice Hogg decided to hand Ellie Butler back to her violent father, she was warned: "You are going to have blood on your hands", according to a source.
Ellie's maternal grandfather Neal Gray, who had cared for her since she was a baby, had strongly protested against the move to award custody to her parents in the family division of the High Court.
Within months, his worst fears came true when Ben Butler killed his six-year-old daughter in a fit of rage. He was sentenced to 23 years in prison on Tuesday.
A serious case review has been commissioned to deal with questions surrounding the role of the recently retired senior judge and whether social services and other agencies could have averted the tragedy.
Butler had a history of violence and was well known to police and social services, which had strenuously opposed the move to award custody to Butler and his partner Jennie Gray.
Gray’s parents, from Wallington, Surrey, had looked after Ellie since she was taken into care at seven weeks old, following allegations that Butler caused brain injuries by severely shaking her.
Ellie's grandmother Linda Gray died on the first day of the murder trial at the Old Bailey and her grieving husband Neal was understood to be too ill to give evidence.
The long-running saga dated back to February 7th, 2007, when Gray took Ellie to a GP with burns to her head and hand, which she said were from rolling into a radiator.
Days later, on February 15th, 2007, Butler rushed Ellie to hospital after she became pale while in his care.
Butler protested his innocence but was charged with grievous bodily harm, convicted at Croydon Crown Court and jailed for 18 months by Judge Timothy Stow QC.
After sharing a jail cell with sex offenders for three months, Butler was released on bail to fight his appeal.
On June 17th, 2010, Lord Justice Moses led a panel of Court of Appeal judges in quashing Butler’s conviction.
New medical evidence cast doubt on the strength of the case and the judges ruled there was “no rational basis” a jury could reject the possibility of an “unknown cause” of Ellie’s injuries.
The Court of Appeal also ruled that the trial judge’s summing up contained “serious misdirections”.
Butler and Gray then embarked on a high-profile publicity campaign to get Ellie back. The couple gave interviews in national newspapers and appeared on breakfast television during 2012.
At hearings in the Family Division of the High Court, Sutton Council pointed out Butler's violent convictions and evidence of domestic abuse against Gray, although she denied it.
But in her judgment, Mrs Justice Hogg, who retired early one week before Butler’s murder trial, ruled that Ellie should be reunited with her parents.
She went much further than the appeal judges and fully “exonerated” Butler, declaring his conviction a miscarriage of justice.
She ordered that an independent social worker (ISW) working for Services for Children (S4C) oversee the handover as the family had been “wronged by the system” in the past.
She said the parents had “no trust” in Sutton Social Services and any assessment work would be “doomed to failure” if left to local authority management.
She rejected fears over Butler’s violent past, saying: “I was impressed by the father. He came through as a reflective, thoughtful individual, who at times over-reacts through frustration.
“I note the convictions include assault on adults, not on children. I accept that he can act out of frustration but that does not necessarily mean he will lose control of his temper however fleetingly towards his baby daughter.”
She said: “The parents have weathered the storm. They have each been resilient and determined, and shown tenacity and courage. I hope now that the record is put straight, that with their tenacity they will be able to put behind them those difficulties and look forward to a more positive future.
“It is seldom that I see a ‘happy end’ in public law proceedings. It is a joy for me to oversee the return of a child to her parents.”
In previously unpublished documents obtained by the Press Association, the judge ordered that Sutton Council write to everyone involved with Ellie’s case to say Butler had been exonerated.
In a further unusual move, she gave Butler and his legal team the power to hammer home the point with letters at any stage in the future. This is thought to have effectively wiped the slate clean.
The independent social worker, whose job it was to oversee the transition, last visited the Butler household in March 2013 and issued a final report to the council in April, S4C said.
The organisation, which consists of two staff, confirmed S4C had been informed by Ellie’s school of her poor attendance and had impressed on the parents how important it was.
S4C said it was unaware of physical abuse against Gray in early 2013.
However, the local authority had been notified of one instance when she gave false details during a hospital visit and asked the social worker to follow it up as part of child protection investigations.
A record of a meeting with the couple was sent to the council and no further action was taken, S4C said.
The organisation stressed that letters from Butler’s team would not have hindered their work in passing on concerns and following safeguarding procedure.
A spokeswoman said: “On the 30th October S4C became aware of the tragic death of Ellie. S4C were contacted by Sutton Borough Council’s safeguarding board regarding the Serious Case Review and have inputted into that process with a report and an interview.
“Since Ellie’s death and throughout the recent trial we have often thought of the impact of Ellie’s death on members of her family. We recognise the sorrow they must have experienced in the time that has elapsed.”
Mrs Justice Hogg refused to comment on the case.
A spokesman for the Judiciary said: “In family and other civil courts, and in the Court of Appeal Criminal and Civil Divisions, judges make their decisions based on all the evidence before them at the time, according to the relevant law.
“They always give full reasons for their decisions in their judgments. Judges do not comment on cases outside court — either their own or those of other judges.”