A federal appeals court yesterday granted a new trial for former naval intelligence officer Jay E. Lentz on charges of kidnapping and killing his ex-wife, ruling that the jury that convicted him had seen evidence that never was admitted in the case.

In a broad decision that resolved several issues in the increasingly complicated case, the U.S. Court of Appeals for the 4th Circuit also threw out the trial judge's finding that the lead prosecutor, Assistant U.S. Attorney Steven D. Mellin, had deliberately placed the evidence in the jury room. The court said the judge made "a rather broad leap" based on a lack of evidence and "clearly erroneous" logic.

The appeals court also took the rare step of removing the judge, U.S. District Judge Gerald Bruce Lee in Alexandria, from the case, ruling that his criticism of Mellin and other prosecutors would require a new judge for the retrial. Lee had accused Mellin of recklessly planting the evidence, which included Doris Lentz's notes about threatening phone calls Lentz allegedly had made to her.

The ruling, for now, settles the swirl of highly personal and unusual allegations involving a federal judge, a career prosecutor and a sitting U.S. attorney. The evidence battle, in which prosecutors accused Lee of bias and Mellin at one point suggested that defense lawyers may have tried to frame him, had come to overshadow Doris Lentz's death.

Now, the case is expected to refocus on the mystery that made it an unusual prosecution from the start: What happened to Doris Lentz, who disappeared in 1996 and whose body has never been found? A federal jury in July 2003 convicted Lentz of kidnapping and killing Doris Lentz, but Lee overturned the verdict -- a first in a federal death penalty case -- ruling that prosecutors never proved that a kidnapping, as defined by federal law, took place.

But the 4th Circuit yesterday reinstated Lentz's conviction even as it ordered the new trial. The judges ruled that the government had proved the key legal point underlying its case: that Jay Lentz had "held" his former wife. Prosecutors predicted that that 4th Circuit ruling would bode well for them at the next trial.

Underscoring the case's importance to the Justice Department, U.S. Attorney Paul J. McNulty called an unusual news conference to praise the 4th Circuit's ruling as a "vindication of Steve Mellin" and to announce that Mellin will remain the lead prosecutor. "There was no basis, no basis whatsoever, to find that a dedicated federal prosecutor acted inappropriately," McNulty said as more than 20 of Mellin's colleagues from the office looked on.

Mellin thanked the appellate court but declined to comment in detail on the ruling. "It's been a tough year," he said. "It was difficult to have your name kicked around like it was. I'm gratified that it's over."

Attorneys for Lentz said they were pleased Lentz would get a new trial but would not say whether they will seek a review of the various decisions by the full 4th Circuit or the Supreme Court.

"We are absolutely pleased that we will live to fight another day for our client," the lawyers, Frank Salvato and Michael Lieberman, said in a statement.

Lee declined to comment through a court spokesman because the case is still pending before the court. It remains unclear when a new trial might begin for Lentz, who has been jailed since he was arrested in April 2001, or which judge would hear it. If convicted, Lentz faces life in prison. Prosecutors said the death penalty will not be an option this time because the jury in the first case declined to sentence Lentz to death.

The 4th Circuit's opinion was written by Judge William B. Traxler Jr. Judge Robert B. King concurred. Judge M. Blane Michael dissented in part, because he said prosecutors never proved that Doris Lentz was kidnapped and held.

The Lentz case has always been unusual because prosecutors brought it with no body, no crime scene and no witnesses. But the case grew especially heated in January when Lee leveled his accusations at Mellin.

The judge said Mellin was the last person to have the disputed evidence, which consisted of two day planners kept by Doris Lentz. Lee also said that Mellin waved one of them around in his closing argument and that his testimony in an evidentiary hearing on the matter had been "less than candid." The judge had ordered the hearing after three jurors came forward in July and said the planners had a significant impact on their decision to convict Lentz.

In his January ruling, Lee said he had excluded most of the materials in the day planners from the case. But the 4th Circuit yesterday said the materials never were excluded; they actually never were formally offered as evidence.

Prosecutors and Mellin vehemently objected to Lee's ruling, accusing the judge of bias against them and their case. Mellin even filed his own appeal with the 4th Circuit.

In yesterday's decision, the three-judge 4th Circuit panel said it understood why Lee had gone to such lengths to determine how the materials got before the jury but that it could not agree with his conclusion that it happened deliberately. The panel said Lee had also erred in concluding that his court staff had nothing to do with the incident, saying his court clerk had "made at least two negligent errors" in her handling of exhibits in the case.

However the materials reached the jury, the court said, "we think it highly unlikely that anyone would have taken the brazen step of intentionally placing unadmitted exhibits" before the jury.

"In our view," the court concluded, "despite the best intentions on the part of the district court and the frustrations associated with this serious incident, the evidence simply cannot support the district court's findings that Mellin intentionally slipped these items into the jury room in contravention of court orders and at risk to his legal career."

Jay E. Lentz was convicted of kidnapping and killing his ex-wife.