Two Soviet emigres entered a surprise guilty plea today, 10 weeks after the start of their trial on charges that they conspired with an FBI agent to commit espionage.

Svetlana and Nikolai Ogorodnikov each pleaded guilty to one count of conspiring with Richard William Miller, the only FBI agent ever charged with espionage, to pass secret documents to the Soviet Union. Other bribery counts were dropped as part of the plea-bargain arrangement.

Ogorodnikova, 35, will be sentenced on July 15 to 18 years in federal prison under the plea agreement. Her husband, 52, who asked to be sentenced immediately, was given eight years. Both faced life sentences if they had been found guilty of all the charges against them.

The trial began last April after several delays, reportedly caused by plea-bargain arrangements that dissolved when Nikolai Ogorodnikov decided not to plead guilty.

Ogorodnikov told U.S. District Court Judge David Kenyon today that, although he was certain he could win his case, he agreed to the plea bargain as part of a package deal to save his wife from a life prison term. All along, he said, he had acted only to save his wife, who has been "a drunk all her life," from a "dangerous road."

"I did everything to help her!" Ogorodnikov cried, pointing to his wife.

Ogorodnikov, his speech slipping from Russian to English and back again, said the FBI "took my wife and used her like a prostitute. I was left outside like a dog . . . . I did everything that was required of me. I did even more than was required of me. I became a sacrifice."

Kenyon sentenced Ogorodnikov to six more years than the emigre's attorney had requested, saying, "It seems to the court that we're talking about one of the most serious types of crimes that can be committed."

But Kenyon also said of Ogorodnikov, who will be eligible for parole after serving one-third of his term, "Perhaps to a great degree the motivation was to protect a member of the family."

The Ogorodnikovs, who immigrated to the United States in 1973, were arrested at their Hollywood apartment last Oct. 2 and charged with offering Miller $65,000 in gold and cash in return for classified documents. The same day, Miller was arrested and fired from the FBI.

The former agent was the prosecution's chief witness in the Russian couple's trial. Miller testified under an immunity grant that bars prosecutors from using his testimony against him when his own trial begins later this summer. Prosecutors said today that they expect the Ogorodnikovs to testify at Miller's trial.

Much of Miller's testimony centered around what he acknowledged was a love affair with Ogorodnikova. He claims that he was not compromised and recruited by a Soviet agent, but rather was working, without the knowledge of his superiors, to infiltrate a Soviet spy ring.