A former National Security Agency employee convicted of selling defense and communication secrets he gained during his career is to be released from federal custody 30 years after his arrest.

Prison records show the sentence for cold-war-era spy Ronald Pelton, 74, ends on Tuesday. He was placed on home confinement several months ago to serve out the final stretch of his sentence, Ed Ross, a Bureau of Prisons spokesman, said.

Pelton, a former NSA intelligence communications specialist, was arrested in November 1985 on charges of selling information to the Soviets about signals intelligence between 1980 and 1985 for $35,000 plus expenses. Prosecutors have said a Soviet KGB agent who defected tipped investigators to Pelton. The agent later returned to Moscow.

Among the secrets Pelton gave up was information about Operation Ivy Bells, an effort by the NSA and the Navy to tap Soviet communications cables that were laid under the ocean.

He was sentenced to three life terms in 1986 by a federal judge who said he had betrayed a "special position of trust," endangered security and damaged U.S. intelligence programs.

Under sentencing rules in place at the time, Pelton was presumptively entitled to release on parole this month after 30 years in custody.

Pelton asked for leniency at sentencing, saying that with a lesser sentence, "I could at least make the rest of my life count." His lawyer called the espionage "the biggest mistake of his life."

Pelton worked for 14 years for the NSA before resigning in 1979. The FBI says Pelton, because of financial problems, approached the Soviet Embassy in Washington after leaving the agency and offered to sell secrets.

The year of Pelton's arrest, 1985, came to be known as the Year of the Spy because of several high-profile espionage cases that occurred then.

Among them were Jonathan Pollard, the former Navy intelligence analyst who provided secrets to Israel and was paroled last week after 30 years in custody; John Anthony Walker Jr., the former U.S. Navy warrant officer who passed cryptographic secrets to the Soviets and died last year.

Pelton had served time in a federal prison in Pennsylvania, but was transferred in the last year to a halfway house and then to home confinement, said Ross, the Bureau of Prisons spokesman.