Steven Mark Chaney sat in a Texas courtroom with the rest of his life on the line and listened as a forensic dentist told jurors it was his teeth that caused bite marks on the arm of a dead drug dealer named John Sweek.

“One in a million,” was the phrase the dentist, Jim Hales, used. There was a one-in-a-million chance that the marks could have come from anyone else.

Prosecutors said that the marks were proof that Chaney had killed Sweek and his wife, Sally. And the jury seemed to agree. Despite testimony from nine witnesses who said they saw him elsewhere, Chaney was convicted of murder and sentenced to life in prison. One juror even said after the trial that it was the bite mark testimony that convinced her, the Associated Press reported.

That was in 1989. Now, after Chaney has spent more than a quarter of a century in prison, he’s been freed by a Texas state court judge. The intervening years have shown that there is little scientific basis for the supposedly conclusive bite mark analysis, and Hale’s “one in a million” claim was just an expression, not a statistic.

Bite mark analysis “is subjective speculation masquerading as science,” Chris Fabricant of the Innocence Project, which worked on Chaney’s case, told the Dallas Morning News.

In an affidavit filed Friday, even the dentist whose testimony helped convict Chaney said that his conclusion was “scientifically unsound.” And, according to advocates and national researchers, it’s not the only type of testimony with that problem.

Chaney isn’t necessarily not guilty, but the evidence that he was guilty was deeply flawed, according to lawyers, advocates and the Dallas County District Attorney. While an appeals court reviews his case, Chaney will be free for the first time in 28 years. He is 59.

After the hearing, Chaney bear-hugged family members and kissed his mother, who beamed. The judge, Dominique Collins, gave Chaney’s attorney a pumpkin pie to give to the newly freed man. She wanted him to have something tasty to eat after decades of prison food, according to the Dallas Morning News.

“I could sit and recount all the wrongs,” Chaney said after a hearing Monday in which Judge Collins threw out his conviction. “The loss of my oldest stepson, my oldest grandchild two years ago, but this is a time for rejoicing and not recounting.”

The bite mark science wasn’t the only faulty aspect of the trial that led to overturning Chaney’s conviction. His lawyers and New York-based Innocence Project investigators also found that prosecutors had knowingly presented false evidence, withheld evidence and elicited false testimony from one of Chaney’s co-workers, according to the AP. Combined with the discredited bite mark testimony, that was enough to convince the district attorney’s office that he did not receive a fair trial.

At least 24 people around the country have been wrongly convicted based on bite mark analysis like the kind presented at Chaney’s trial, according to the Dallas Morning News. The technique has been used in modern courtrooms since 1954, when police investigating a grocery store burglary in West Texas compared teeth marks left in a piece of cheese (apparently, this was a burglar with an appetite) to a bite mold from a suspect. The marks matched, and the suspect was sentenced to two years in prison.

But bite mark analysis really made it big 25 years later, during the 1979 trial of serial killer Ted Bundy. A year before, Bundy had gone on a killing spree in Florida, murdering two women and leaving three others seriously hurt. Investigators found a bite mark on one of his murder victims that a forensic dentist said matched Bundy’s mangled teeth. Bundy was found guilty and executed, and bite mark analysis was hailed as an innovative new technique that helped convict killers.

For decades, bite mark analysis continued to be used as a tool for identification. According to a 2009 report on forensics from the National Academy of Sciences, courtrooms accepted the technique with few questions. The testimony, coming from dentists, had the patina of scientific analysis, even though the practice was developed in crime labs rather than research settings subject to rigorous scientific scrutiny. There was little incentive for researchers to research the technique’s foundations and limitations, and although experts tried to refine the practice, nothing was done to test its reliability until the introduction of DNA testing in the late ’80s and early ’90s.

In 1999, members of the American Board of Forensic Odontology met to test their technique, attempting to match four bite marks to just seven dental models (as opposed to comparing a single bite mark against an “open population” of thousands, even millions, as most forensic dentists, including Hale, must do). They turned up false positives 63.5 percent of the time, according to the National Research Council. A 2001 study put the rate of false identifications lower — between 12 and 22 percent — but still too high to be considered conclusive. And last year, a study of forensic odontologists found that the analysis couldn’t even determine which marks were bite marks.

Many scientists don’t believe that human skin can record a bite mark accurately enough to match the teeth of the person who inflicted it — wounds stretch and swell and heal. And even if it could, the National Academy of Sciences says there is no good way of matching bites to jaws, or even determining what percentage of people could produce a bite matching one from a crime scene — after all, we have no national jaw database to reference for statistics and eccentricities.

Then there’s the human frailty factor: Investigations of publicly-funded crime labs have turned up mislabeled samples; untrained investigators; and techniques that produced inconsistent, unreliable results. Often, two labs looking at the same evidence reached different conclusions.

Bite mark analysis has its defenders: On his Web site, Texas-based forensic odontologist Roger D. Metcalf writes that dentists giving bite mark testimony are technical experts, not scientists. They’re offering insight based on their expert knowledge about teeth, and it’s up to the jury to make of it what they will. He added that bite mark evidence can play a crucial role in exonerating defendants as well as implicating them. Bite mark analysis clears the bar of relevance and reliability required for evidence in court, he said, so experts should be allowed to continue to provide it.

But increasingly, researchers and criminal justice experts have urged that the practice be eliminated, or at least better contextualized in the court. Bite mark evidence, the National Academy of Sciences said in its 2009 report, is “introduced in criminal trials without any meaningful scientific validation, determination of error rates, or reliability testing to explain the limits of the discipline.”

This was true not just for bite marks but for all kinds of pattern-based evidence — handwriting analysis, hair microscopy, shoe print comparisons, even fingerprints. Of the roughly 200 DNA and death row exoneration cases in the two decades after DNA testing was introduced, more than a quarter involved faulty forensic testing or testimony, the Chicago Tribune reported in 2004.

Despite that, these types of forensic evidence can powerfully persuasive — their technicality and aura of scientific credibility convince jurors, who usually don’t have the expertise to be critical of their shortcomings.

“I have no problem with forensic science. I have a problem with the impression that’s being given that those disciplines … can make an absolute identification of someone, and that’s not the case,” Terrence Kiely, a DePaul University law professor and author of “Forensic Evidence: Science and the Criminal Law,” told the Chicago Tribune in 2004.

“It’s the white-coat-and-résumé problem,” he added. “They’re very, very believable people. And sometimes the jurors will take [their testimony] as a `yes,’ where the science can only say it’s a ‘maybe.’ ”

In Texas, the state Forensic Science Commission has agreed to review the case for eliminating bite mark evidence after the Innocence Project submitted a complaint asking for an investigation into the practice.

“When the Texas Forensic Science Commission reviews the validity and reliability of bite mark evidence,” Fabricant told Texas TV station WFAA, “you’re going to find a lot more Steven Mark Chaneys.”