A fired CIA employee who officials say led a nomadic life in a recreational vehicle for nearly a year was arraigned Friday on charges he told two foreign governments the CIA had cracked their code systems.

Douglas Fred Groat, 50, also was charged with trying to extort $500,000 from the intelligence agency. One motive may be revenge for his firing, according to an FBI official.Groat pleaded not guilty to charges he told the two governments the CIA had broken their cryptographic systems. Authorities refused to name the two foreign governments, citing national security reasons. The spying took place in March and April 1997, ac-cording to the U.S. Attorney's Office.

Two counts of passing secrets carry a maximum penalty of death, although prosecutors said they have not decided yet whether to seek that punishment.

Groat, burly, bearded and tanned, made a brief appearance before Chief U.S. District Judge Norma Holloway Johnson. Wearing dark blue jail clothes, Groat was silent during the 10-minute hearing. He was accompanied by his public defender attorney, A.J. Kramer.

Johnson ordered him held without bail after assistant U.S. attorney Eric Dubelier said he posed "a risk of flight and a danger to the community."

"Based on his former employment with the CIA, he is trained in travel and false identity and deception," Dubelier said. "He has no ties to the community, and he possesses sensitive classified information" that could be shared with other countries if he were released on bond.

Said U.S. Attorney Wilma Lewis: "This case involves highly sensitive classified information that could have a serious impact on the national security of the United States. In short, this is a serious espionage case."

CIA director George Tenet described the charges as "extremely serious." Tenet noted Groat last had access to classified information in 1993.

"The full extent of any damage to U.S. national security has yet to be determined," Tenet said.

Although the indictment says the extortion attempt occurred from May 1996 until February 1998, it is unclear whether the CIA actually ever paid Groat any money. Prosecutors would not detail how the extortion attempt worked.

Lewis said Groat wanted the money "in return for agreeing not to reveal to foreign governments, CIA activities and methods known to him as a result of his employment."

Prosecutors and the FBI would not say how they discovered Groat's alleged espionage activities. They did say the investigation has been going on for about a year. It is a joint investigation, involving the FBI, U.S. Attorney's Office and the Justice Department with help from the CIA.

Groat was arrested "without incident" around 2 p.m. Thursday in the FBI office in Washington, according to Jimmy C. Carter, the assistant director in charge of the Washington office.

Groat is the third current or former CIA employee to be accused of espionage in the past four years.