The state’s highest court ordered a new trial Wednesday for a former Baltimore police sergeant convicted nearly two decades ago of murdering his young mistress — a ruling that could affect cases that relied on bullet testing used for decades until being debunked.

Gina Nueslein, a 22-year-old clerk at a Royal Farms, became entangled with Sgt. James Kulbicki, who was 14 years her senior, in a relationship that soured as she sued him for child support. Twenty years later, Kulbicki has a chance to demonstrate the innocence he has maintained, but Nueslein’s family must experience the ordeal of her death again.

Nueslein’s sister, Jennifer Getz, said she was in shock when she learned of the new trial. “It causes my family hardship every time we relive this,” she said.

A sharply divided Court of Appeals found that Kulbicki’s lawyers should have done more to challenge the comparisons of lead in bullets and granted a new trial. The technique had been used for 40 years before it was found to be unreliable and was abandoned.

With the ruling, others could seek a new trial if their lawyers didn’t question that kind of bullet analysis or other forensic evidence, said Stephen B. Mercer, the head of forensics at the Office of the Public Defender. He said the ruling underscores the importance of challenging scientific evidence in court.

“In our culture, science is the method to determine an objective truth, so it’s very persuasive evidence, but the fact that it’s persuasive means it has great potential to mislead,” he said.

Kulbicki had been fighting his conviction for years, arguing that much of the scientific evidence that helped send him to prison for life was actually junk. Edwin Kilpela, his attorney, said Kulbicki and his family were thrilled at the appellate ruling.

“We’ve been arguing for six years that Jim’s trial was fundamentally flawed in so many ways that there could be no confidence in the verdict,” Kilpela said.

It falls to Baltimore County State’s Attorney Scott Shellenberger to determine whether the case can be retried so many years later. He said he will order the 13 boxes of evidence from storage to determine what is still usable.

“We have to find if witnesses are still around, what their memories are like and what forensic evidence is available,” Shellenberger said.

While forensic evidence undid the conviction, the prosecutor said he hopes it might be used to restore it, pointing to greatly improved DNA testing techniques now in use.

Nueslein’s body was discovered by a park ranger in a remote area of Gunpowder Falls State Park on Jan. 10, 1993, a few days before a court hearing in which she planned to seek child-support payments from Kulbicki.

Investigators concluded that she had been shot at close range and dumped, and an eyewitness saw Kulbicki in his truck at the park around the time of the killing.

Kulbicki was charged with the crime and convicted in 1993. When that verdict was tossed out because the judge didn’t give him a chance to rebut the testimony of two state witnesses, the case was retried in 1995. Baltimore County prosecutors marshaled an array of forensic evidence against him, including DNA and ballistics analysis.

They also used testimony from FBI expert Ernest Peele, who compared the lead in a bullet fragment found during the victim’s autopsy with a fragment found in Kulbicki’s truck and with bullets found in his handgun.

The expert said their chemical composition matched, indicating that the fragments were from the same bullet and that they could have been from the same box as the bullets found in the gun.

“Because we don’t have any witnesses who actually saw the defendant put the gun to [the victim’s] head, we fill in the gaps,” a prosecutor said in closing arguments, according to court records. “And the way we fill them in is with forensic science.”

A jury convicted Kulbicki again, and he was sentenced to life in prison.

For a decade the case seemed settled, but in 2006 a team of lawyers mounted a new challenge, raising questions about the forensic evidence.

In 2006, the Court of Appeals ruled in a separate case that such bullet comparisons are badly flawed and that they should not be used as evidence in criminal cases. But that left open the question of what should happen to people convicted before the ruling.

In Kulbicki’s case, the court took the unusual step of choosing its own issue to reach a decision, rather than looking at those raised by the appellate lawyers.

A four-judge majority found that some questions about bullet comparison had been raised at the time of the 1995 trial in a report written by Peele, the FBI expert. Kulbicki’s attorneys should have discovered that report and used it to attack the evidence, the judges wrote.

“When Agent Peele was cross-examined, the 1991 study authored by him was never exhumed,” wrote Judge Lynne A. Battaglia. “The potential for having two bullets with the same composition produced at different times was never explored, even though opportunity knocked.”

Three dissenting judges questioned whether that study was widely available and noted that Peele concluded that bullet comparisons were valid despite the questions he raised. It was not until much later that the FBI abandoned the technique.

And Brian S. Kleinbord, a senior lawyer in the Maryland attorney general’s office, which handled the appeal, criticized the outcome, saying it made no sense to hold defense lawyers accountable for changes in forensic science that weren’t widely adopted until nearly a decade after the trial.

Nueslein’s family now has to deal with going through the legal process again. The son that Kulbicki fathered with her was too small to comprehend the violent events that marked his early life, but now he’s grown.

“When the first two trials went on, he was young and we could shield him from this, and now he’s an adult, he’s going to want to come,” Getz said.

Prosecutors announced new indictments Monday of Baltimore jail staff, the same day a top corrections official testified in the federal corruption trial of eight inmates and corrections officers about the difficulty containing misconduct in the system.