The espionage conviction of Richard Miller, the only FBI agent ever convicted of spying, was overturned by a federal appeals court Tuesday because of the use of lie-detector evidence at his trial.

The 9th U.S. Circuit Court of Appeals ruled that the jury should not have been told the results of Miller's polygraph examinations, which concluded that he was lying about his motives.The polygraph evidence bolstered the credibility of Miller's later admissions of wrongdoing, "the heart of the prosecution's case," the court said in a 3-0 ruling.

The decision entitles Miller to a new trial on charges that he spied for the Soviet Union.

Miller was convicted in June 1986 of passing secrets to the Soviets through his lover, Svetlana Ogorodnikova, in return for promises of $65,000 in cash and gold. He was sentenced to two life terms plus 50 years in prison.

She and her husband, Nikolay Ogorodnikov, pleaded guilty to conspiracy to commit espionage and are serving prison terms.

Miller, a 20-year FBI veteran, was portrayed by prosecutors as a bitter, vengeful failure easily recruited as a spy. The defense described him as a well-meaning FBI misfit who dreamed of redeeming his career by infiltrating the Soviet spy network in the United States.

He was charged with furnishing a clasified document called the Positive Intelligence Reporting Guide, which sets forth annual U.S. intelligence needs, to his lover for delivery to the Soviet consulate in San Francisco in August 1984.