In the late 1960s, David Barnett was a CIA officer working undercover as a U.S. diplomat in the Indonesian seaport of Surabaya. His main job, according to a source familiar with his activities there, was to recruit Russian officials at a nearby consulate to spy for the United States.

This Friday, a grand jury in Baltimore is expected to return an indictment charging Barnett with espionage on behalf of the Soviet Union. FBI and Justice Department officials refuse to comment on the case, the first in which a former covert CIA operative is suspected of being recruited by the Soviet KGB.

But sources familiar with the case said yesterday that they think Barnett became a Soviet agent after he left the CIA in 1970 and stayed on in Indonesia to run an antique-exporting firm that got into financial difficulty. i

"That's the dangerous part when you play footsie with the other side," one source said. "The CIA has a dumb belief that no American can be turned."

Barnett returned to the United States and tried unsuccessfully in 1977 to get a job on the staffs of the Senate and House Intelligence committees. A short time later, American intelligence officials became suspicious of him and warned the congressional committees about the attempted penetration, sources said.

Sen. Daniel Inouye (D-Hawaii), chairman of the Senate committee at the time, then issued a cryptic statement saying he expected the CIA to promptly report any efforts by the communist intelligence agencies to penetrate Congress.

In 1979, Barnett was rehired as a contract employe by the CIA, in hopes of confirming the suspicions that he was a Soviet agent, sources said, and when confronted with the evidence this year he confessed to having been paid about $100,000 by the Soviets for passing them classified information about U.S. conventional weapons systems and attempting to join the congressional committee staffs.

Background information about to covert intelligence operative is understandably sketchy. Barnett is listed in the State Department's 1969 Biographic Register as having been a political officer in Surabaya since August 1967.

The 47-year-old "reserve" Foreign Service officer -- the usual cover in those days for an intelligence officer -- was born in Pennsylvania and got his B.A. degree at the University of Michigan in 1955.

He then served in the Army for three years, and from 1958 to 1967 was an "analyst" for the Army in South Korea and Washington. From 1963 on, sources said, Barnett was a CIA officer.

One source familiar with his activities in Indonesia said yesterday that the sole purpose of having an intelligence agent at the U.S. consulate in Surabaya was to make contact with officials at The Soviet conuslate in the city. Barnett was good at his job, this source said, and he sent back optimistic reports that he was getting close to a Russian attached to the consulate.

But Barnett resigned suddenly from the CIA in 1970, the source said, because of a personality conflict with the superior who was soon to arrive in Jakarta as the new chief of station.

Barnett stayed on in Indonesia, though, and apparently kept in contact with his Russian friend. "Instead of him getting them, it looks like they recruited him," one intelligence expert said.

Barnett now lives in Bethesda with his wife and three children. Some neighbors refused to talk about him and others said they had no idea what Barnett's occupation was.

It is unclear how U.S. counterintelligence officials learned of Barnett's alleged dealings with the Soviets. And while several U.S. intelligence officials said yesterday that they do not consider him to be a high-level "mole" so prevalent in spy novels, some also predicted he will not be the last example unearthed of an American agent turned by the KGB.