BOSTON (AP) — Two hairs that looked like the victim's; some dirt on a truck like that taken from the crime scene; a pattern on the bumper that resembled a design on the victim's popular brand of jeans. The case against Steven Barnes in the rape and murder of a 16-year-old girl seemed circumstantial, at best.

So the guilty verdict shocked him.

"I was saying, 'This can't be happening. You can't convict somebody on similarities, perhaps or maybes,'" Barnes said.

He spent the next 20 years in prison before DNA testing exonerated him, becoming one of hundreds of people convicted in whole or in part on forensic science that has come under fire during the past decade.

Some of that science — analysis of bite marks, latent fingerprints, firearms identification, burn patterns in arson investigations, footwear patterns and tire treads — was once considered sound, but is now being denounced by some lawyers and scientists who say it has not been studied enough to prove its reliability and in some cases has led to wrongful convictions.

Even so, judges nationwide continue to admit such evidence regularly.

"Courts — unlike scientists — rely too heavily on precedent and not enough on the progress of science," said Christopher Fabricant, director of strategic litigation for the Innocence Project. "At some point, we have to acknowledge that precedent has to be overruled by scientific reality."

Defense lawyers and civil rights advocates say prosecutors and judges are slow to acknowledge that some forensic science methods are flawed because they are the very tools that have for decades helped win convictions. And such evidence can be persuasive for jurors, many of whom who have seen it used dramatically on "Law & Order" and "CSI."

Rulings in the past year show judges are reluctant to rule against long-accepted evidence even when serious questions have been raised about its reliability:

— A judge in Pennsylvania ruled prosecutors can call an expert to testify about bite marks found on a murder victim's body, despite 29 wrongful arrests and convictions nationwide attributed to unreliable bite mark evidence since 2000.

— A Connecticut judge allowed prosecutors to present evidence that a footprint was made by a specific shoe belonging to a man accused of murder, despite a 2016 finding by the President's Council of Advisors on Science and Technology that such associations are "unsupported by any meaningful evidence or estimates of their accuracy."

— In Chicago, a federal judge rejected a request to exclude testimony of government experts to describe firearm and tool-mark comparisons they performed on bullets collected at crime scenes in the trial of Hobos gang members. The judge reasoned that defense lawyers were free to cross-examine the government's experts.

Two reports by scientific boards have sharply criticized the use of such forensic evidence, and universities that teach it are moving away from visual analysis — essentially, eyeballing it — and toward more precise biometric tools.

But some defense lawyers fear any progress on strengthening forensic science may be lost under President Donald Trump.

In April, Attorney General Jeff Sessions announced the Justice Department would disband the National Commission on Forensic Science, an independent panel of scientists, researchers, judges and attorneys that had been studying how to improve the reliability of forensic practices.

Some forensic methods have been questioned by defense lawyers for years, but it wasn't until 2009 that the National Academy of Sciences, a nonprofit consisting of some of the nation's most distinguished researchers, released a report that found that with the exception of DNA, many methods had not been tested enough to be considered valid.

"The simple reality is that the interpretation of forensic evidence is not always based on scientific studies to determine its validity," the report said. "That is a serious problem."

The National Registry of Exonerations at the University of California Irvine has documented more than 2,000 exonerations since 1989. Nearly one-fourth list "false or misleading forensic evidence" as a contributing factor.

And a report last fall from the President's Council criticized several "feature-comparison" methods, which attempt to determine whether a sample from a crime scene is associated with a sample from a suspect by comparing patterns. The council said those methods — including analysis of shoeprints, tire tracks, latent fingerprints, firearms and spent ammunition — need more study to determine their reliability and error rates.

When the reliability of forensic evidence is challenged through DNA testing or other new evidence, it often results in the granting of a new trial, even if there is other strong evidence against a defendant.

"More often than not, it undermines confidence in the verdict, which is enough to get a new trial," said Daniel Medwed, a law professor at Boston's Northeastern University.

In 2015, the Justice Department revealed that FBI agents had overstated the strength of their evidence for decades in many cases involving microscopic hair analysis. The FBI now acknowledges microscopic hair analysis is inconclusive and uses it only in conjunction with DNA testing.

Kirk Odom was 18 when he was charged with raping a woman at gunpoint in Washington, D.C. An FBI agent testified that a hair on the woman's nightgown was "indistinguishable" from Odom's, a conclusion he said he had reached only eight or 10 times during thousands of analyses.

"I just kept saying, 'They're lying. That ain't my hair,'" Odom recalled.

Odom spent 22 years in prison but was exonerated after DNA testing of the hair and other evidence excluded him as the rapist.

The President's Council also found that bite mark evidence does not meet scientific standards and is unlikely to ever do so.

That didn't surprise Keith Harward, a former Navy sailor who spent 33 years in prison for the 1982 killing of a man and the rape of the man's wife in Newport News, Virginia.

Forensic dentists testified that his teeth matched bite marks on the woman's leg. But in 2014, DNA tests matched sperm at the scene to one of Harward's former shipmates, who had died years earlier in prison after being convicted of a different crime.

One of the experts was Dr. Lowell Levine, an odontologist who testified in the case of serial killer Ted Bundy, linking Bundy to the 1978 murder of a college student.

"Here he comes waltzing up in the courtroom with these normal, everyday people in the jury — 'I testified in the Ted Bundy case' — well, boom! That was the first nail in my coffin," Harward said.

"I was done; the jury was hypnotized," he said.

After Harward was freed last year, Levine said he was "upset and quite disturbed" by the mistake. He told The New York Times that he and another expert had "completely followed" guidelines and that considerable evidence seemed to point to a match with Harward.

But, he acknowledged, "This case should persuade all my colleagues to agree with the need for more scientific research and investigation."

In March, a Pennsylvania judge granted a request from prosecutors to call a forensic dentist to testify about bite mark evidence in the retrial of Paul Aaron Ross , who was convicted of killing a 26-year-old woman in 2004. The Pennsylvania Supreme Court granted Ross a new trial after finding his attorney wasn't given enough time to prepare.

Judge Jolene Kopriva acknowledged bite mark evidence was "beginning to face challenges," but she said it would be premature for her to declare it "no longer generally accepted." Kopriva did not return a call seeking comment. Judges typically aren't allowed to comment on their cases.

Lisa Wood, who represented a defendant in the Chicago gang trial , argued that prosecutors should not be allowed to introduce firearms identification evidence because of the 2016 President's Council report.

"It can be very powerful evidence, and it doesn't seem consistent with the principles of justice that we would introduce this kind of evidence without knowing that it's sound," she said.

In Massachusetts, a judge ruled that prosecutors could present ballistics evidence in the double-murder trial of ex-NFL star Aaron Hernandez. He was eventually acquitted but was already serving a life sentence in a separate killing; he hanged himself in prison days after his acquittal.

Tool-mark analysis — when investigators try to match physical characteristics of a gun to markings on a fired bullet or casing — has been recognized as admissible in Massachusetts courts for more than a century, Judge Jeffrey Locke wrote.

The judge did not respond to requests for comment.

Some judges have started to limit certain types of forensic evidence.

In December, a Missouri judge wrote a scathing opinion about ballistics evidence, saying comparing striations on bullets to determine whether they came from a certain gun is purely subjective.

"It remains a rather obvious notion that if forensic method lacks foundational validity, then a criminalist should not be heard in court to opine that 'this bullet came from that gun' and it is practically impossible that she is wrong," Judge Calvin Holden wrote in the case of Scott Goodwin-Bey, accused in the fatal shootings of four people in 2014.

The judge ruled that he would "very reluctantly" allow a ballistics expert to testify, but "only to the point this gun could not be eliminated as the source of the bullet," not that the gun could definitively be linked to bullets found at the crime scene.

A few months after the ruling, prosecutors dropped the charges, citing the judge's ruling.

Many prosecutors scoff at the notion that long-used forensic evidence is not scientifically valid, saying groups that have criticized the techniques were too heavily influenced by defense attorneys.

"This National Commission on Forensic Science — it's an academic think thank of people with points of view that are not to better forensic science, but to change the system from the ground up to make it virtually impossible to convict anybody," said William Fitzpatrick, a prosecutor in Syracuse, New York.

The debate, though, has resulted in some concessions by prosecutors.

The Justice Department last year announced a new code of professional responsibility for its labs and advised examiners and prosecutors to use restraint when discussing their findings, banning the phrase "reasonable scientific certainty."

Critical reports, wrongful convictions and scandals involving unscrupulous lab chemists have sparked discussion at universities and an increased emphasis on the language analysts should use in court. Visual analysis is also increasingly coming under fire, said David Foran, director of the forensic science program at Michigan State University.

"The idea is, instead of a person looking at two things and saying they are the same, they're not, or I can't tell," Foran said, "is to actually have computer scans of them, at a digital level, to find out how similar they are."

For Barnes, those similarities added up to convictions in Utica, New York, on murder, rape and sodomy charges.

"I said to myself, 'The jury has to understand; they won't convict me on this stuff they say is similar,'" Barnes recalled.

"I was wrong."