Sion Jenkins has been formally acquitted of the murder of his foster daughter after the jury at the Old Bailey failed to reach a verdict.
It was the third time Mr Jenkins, 48, had gone on trial for the murder of Billie-Jo in Hastings, East Sussex.
The former deputy head teacher, now of Lymington, Hampshire, had always denied murdering the 13-year-old at the family home on 13 February 1997.
Following the trial, a member of Billie-Jo's family attacked Mr Jenkins.
The jurors had spent 39 hours and 10 minutes deliberating but indicated they were not going to agree on a verdict.
The prosecution said on Thursday it would not seek another retrial.
Billie-Jo Jenkins was battered to death with an iron tent peg in the back garden as she painted patio doors.
Mr Jenkins told police he found her lying in a pool of blood.
Speaking outside the court, Mr Jenkins said it had taken more than nine years of struggle and had been a "terrible ordeal" and that his conviction had been a "miscarriage of justice".
He said: "Billie-Jo's murderer has escaped detection because of the dreadful errors in the police investigation and their single-minded and desperate determination to convict me at all costs.
"The police who have been in charge of the inquiry have been wilfully blind and incompetent."
'Case never closed'
Mr Jenkins then called for the murder investigation to be reopened with a new police team.
In a statement, Sussex Police Assistant Chief Constable Geoff Williams said the force had resolutely sought justice for Billie-Jo.
"A case such as this is never closed... the public would rightly expect the police to do everything they reasonably can to bring her [Billie-Jo's] killer to justice."
Sion Jenkins was punched by a woman outside the Old Bailey
Prosecutor Nicholas Hilliard said following two lengthy trials in which neither jury had been able to reach a verdict now was the time "to offer no further evidence".
Soon after the decision was announced, Sion Jenkins was attacked outside the court by members of Billie-Jo's family.
A woman hurled herself at him, repeatedly punching him in the face, until police stepped in to restrain her.
In court, Mr Jenkins's barrister Chris Sallon called for an inquiry into how his client had been attacked.
A spokesman for the Department of Constitutional Affairs said: "We are making inquiries as to how this happened. No one should be subjected to any violence in our courts."
Mr Jenkins was originally convicted of the murder in 1998 and underwent two appeals.
His conviction was quashed at the second appeal in 2004 and a retrial ordered.
Domestic violence claim
In 2005, the retrial jury failed to reach a verdict, leading to the third trial getting under way last autumn.
Following Mr Jenkins' acquittal, an account emerged of evidence given by his first wife, Lois, to the Appeal Court in 2004.
Her testimony, which remained uncontested but was not heard by the retrial jury, alleged she had suffered years of domestic violence.
"When he lost his temper we never argued, he never shouted, he would just lose it, snap and in a few moments he would be back to normal," she said.
In one incident, three years before Billie-Jo's death, he hit his wife hard around the face.
"My head was spinning with the force of it," she said. "I went and hid in the loft crying."