A Maryland judge has thrown out the murder convictions and ordered a new trial for a man imprisoned for nearly 32 years in a notorious 1981 double killing in Harford County, faulting scientific errors in the testimony of several FBI forensic experts.

Frederick County Circuit Court Judge G. Edward Dwyer Jr. made the ruling after a new DNA test in March refuted key FBI statements in the 1983 trial of John Norman Huffington, who is now 50.

The genetic testing contradicted testimony by an agent with the FBI Laboratory who said that he found Huffington’s hair in the bed where one victim was killed, claiming an accuracy rate of 99.98 percent.

“Due to the substantial weight given to the microscopic hair analysis by the jury . . . as well as the results of the DNA test . . . there is a significant possibility that the outcome of Petitioner’s case may have been different,” Dwyer wrote in a May 1 order that Huffington’s lawyers received Wednesday.

Harford County State’s Attorney Joseph I. Cassilly said he will ask Dwyer to reconsider the ruling and, if necessary, appeal, citing evidence of Huffington’s guilt.

Cassilly said he would continue to pursue the case “if there is any possible way I can.”

Huffington’s lawyers said they hoped there would be no retrial.

“John Huffington has asserted his innocence for more than 30 years,” said Ryan M. Malone, counsel with the Ropes & Gray law firm. “He’s served 30 years in prison, and today we’re celebrating a victory because the truth has finally come out.”

Huffington’s case was among those featured in a series of articles last year in The Washington Post, which reported that government officials knew for years that flawed forensic testimony and false hair matches may have led to hundreds of wrongful convictions.

On Tuesday, Mississippi’s Supreme Court stayed the execution of Willie Jerome Manning for a 1992 double slaying after the FBI offered to retest DNA evidence because of testimony problems uncovered by a new Justice Department review of all FBI hair cases from the 1980s and 1990s.

In Maryland, Huffington was convicted of shooting Joseph Hudson, 30, during a drug deal on May 25, 1981, and later using a vodka bottle and knife to beat and stab Hudson’s girlfriend. Diane Becker, 21, was stabbed 33 times in their trailer as her 4-year-old son slept nearby.

Huffington’s trial was moved to Frederick County. A key prosecution witness was Huffington’s friend, Deno Kanaras, who testified that he sold Huffington a gun and that Huffington used that gun in the crime. Kanaras also testified that he was forced to accompany Huffington in the killings.

The FBI found blood and Huffington’s fingerprint on a gallon liquor bottle that was dumped in the woods near Becker’s burned purse. Kanaras led police to the evidence, as well as to a gun, knife and bullets.

Huffington claimed that while he had been with Kanaras and the victims earlier that evening, he had gone home to bed. The fingerprint, he said, was left during one of several earlier visits to the trailer. Kanaras secured a lesser sentence after prosecutors tried him separately for Becker’s murder; he was freed on parole in 2008.

Huffington’s lawyers said they did not know of specific problems with the FBI hair examination until informed by The Post that in July 1997, Cassilly considered and then rejected having the FBI review the case because the hair expert involved, FBI Special Agent Michael P. Malone, had been discredited.

Cassilly said he subsequently asked the FBI to go forward with a DNA test, which led to the new findings in March.

While an FBI microscopic hair examination last May reached the same conclusion as Malone, DNA testing found that the hair on Becker’s bedsheet that was traced to Huffington did not come from him, Kanaras, Hudson or Becker.

Separately, other FBI agents testified that bullets found at several crime scenes could be traced to a single box of ammunition. They relied on a technique that has been scientifically discredited. They also claimed that slugs found at different scenes were fired by a single weapon, a claim the FBI now says must be qualified.

Huffington was initially sentenced to death. He was resentenced to two life terms in prison after a 1991 appeal .

A retrial would be Huffington’s third. His defense has cost more than $1 million, his lawyers said.