Accused FBI agent-turned-Soviet spy Robert P. Hanssen confessed to his wife and a priest more than 20 years ago that he was betraying the U.S. for money, several years earlier than authorities previously suspected, people close to the case said Saturday.

Authorities say Hanssen, a former counterintelligence official in the bureau's New York office, is responsible for what could be one of the most damaging spy cases in U.S. history, handing over to the Soviets the identities of several double agents and causing the executions of some of them.

Prosecutors allege Hanssen passed U.S. secrets to Moscow in exchange for $1.4 million in cash and diamonds. The FBI said it obtained original Russian documents that detailed Hanssen's activities, including letters he allegedly wrote to his Russian handlers and secret codes used to signal when and where he would drop documents. Fourteen of the charges against Hanssen are punishable by death.

Hanssen pleaded innocent to all charges last month.

Hanssen's wife, Bonnie, told the FBI that her husband had told her he was giving the Soviets nonvital information in 1979 after she caught him doing something suspicious, and that he then went to a Roman Catholic priest who urged him to turn himself in, the sources, who spoke on condition of anonymity, said.

The FBI had previously accused Hanssen of becoming a Soviet operative only since 1985.

The priest who received Hanssen's confession later changed his mind about turning himself in and instead told him to donate the $20,000 he had gotten to Mother Teresa's charity. Hanssen then swore to his wife that he would cut off contact with Moscow, the source said.

Though Hanssen had claimed the information he was giving was useless, the sources characterized it as "something substantial."

But then six years later, Hanssen resumed his espionage without his wife's knowledge, confessing to a second priest on one occasion in the early 1990s, the sources said.

Mrs. Hanssen "is absolutely noncomplicit" in her husband's illegal activities, said one source.

Justice Department spokeswoman Casey Stavropoulos declined to comment, as did Hanssen's lawyer, Plato Cacheris.

The new disclosures come as sources close to the case say prosecutors and attorneys for Hanssen are nearing a deal in which Hanssen will reveal his secrets and the Justice Department will not seek to put him to death.

Under the informal agreement, a term of life imprisonment for Hanssen would depend on the government being satisfied that he is cooperating with its inquiries, two people familiar with the negotiations said Friday.

The government and Hanssen's lawyers have agreed to an Oct. 29 date for a jury trial. A plea bargain would avert that.

The Associated Press contributed to this report.