Accused spy Ronald W. Pelton was portrayed by a government attorney in court today as a cunning negotiator who knew he faced prosecution for selling intelligence secrets to the Soviets and who tried in vain to strike a deal with FBI agents during the interrogation sessions that led to his arrest.

In an effort to undercut Pelton's claims that he was tricked into making damaging admissions that are now being used against him in court, prosecutor John G. Douglass tried to show during cross-examination that Pelton gave FBI agents what he believed was just enough information to show that he was "cooperating" with them.

Pelton, 44, a former National Security Agency employe who is accused of selling the Soviet Union information about five top-secret U.S. intelligence-gathering projects, acknowledged that the FBI agents never explicitly told him they wanted to use him in counterintelligence work. But he testified before the defense rested its case this afternoon that the agents repeatedly suggested that they needed information and help from him to penetrate Soviet intelligence operations.

The case is expected to go to the jury Wednesday.

During cross-examination, Douglass tried, sometimes unsuccessfully, to show that Pelton lied during his interviews with the FBI in November. At least five of the prosecutor's questions about Pelton's truthfulness were withdrawn or stricken from the record because U.S. District Judge Herbert F. Murray ruled they went beyond the scope of the interrogation session itself, the only area of questioning permitted.

The judge refused to allow Pelton to answer a question raised by the government to show that Pelton must have known that he was of no value to the FBI as a double agent or as a counterintelligence officer. According to court papers and arguments presented at a pretrial hearing, the Soviets had likely learned the United States suspected Pelton of spying through former KGB colonel Vitaly Yurchenko, who defected here last August and provided information that eventually led to Pelton's arrest.

Yurchenko defected back to the Soviet Union in November and is presumed to have told the Soviets that he provided information leading U.S. authorities to Pelton.

"You certainly can't be a double agent or provide information if the other side knows you've been compromised, can you?" asked Douglass. Murray ordered jurors to disregard the question and had it stricken from the court record.

Pelton has admitted receiving $35,000 from the Soviets between 1980 and 1985, the period covered by the espionage charges.

Under questioning by Douglass, Pelton admitted that he lied to his girlfriend, Ann Barry, and to one of his employers, telling them when he went to Austria to meet with Soviet agents that he was going abroad to do undercover work for the CIA. "The government would call that a cover story," said Pelton.

The government appeared to be trying to undermine the credibility of Pelton's testimony in which he denied that he told the FBI agents that he sold information about four NSA intelligence-gathering projects to Soviet agents.

Pelton has acknowledged that he made incriminating statements to the FBI about Project A, an NSA program to intercept signals from a Soviet communications link.

But Pelton said he made the statements after being assured by FBI agents that what he said would not be used against him.

Douglass attacked Pelton's claims that FBI agents tricked him into believing they were not considering prosecuting him. The prosecutor cited taped statements Pelton made to his girlfriend Barry during a break between the interrogation sessions on Nov. 24. The statements, which were recorded on a government wiretap of Barry's apartment, have been admitted as evidence.

"There's a deal I might be able to make," Pelton is heard telling Barry, adding at another point, "My alternative is about 20 years in jail."

In government testimony, Pelton has been characterized as a "wheeler-dealer," a skilled budget negotiator during his 14 years at NSA and a man who tried to put together multimillion-dollar international money-brokering deals after he left the agency in 1979.

Pelton acknowleged today that he was an experienced negotiator, but said he was not trying to make a deal with FBI agents. Rather, he said, he was trying to comply with their request that he "cooperate" by providing details of how and when he made contact with the Soviets. He said he refused to answer some of the agents' questions about what information he sold to the Soviets because the agents had told him they were not interested in a "damage assessment."

"The position I was in was to take what they would give me," Pelton said. "I was in no position to demand anything."

However, Pelton agreed with Douglass' assertion that "they were being very indirect with you and you were being very indirect with them."

Under questioning from his defense attorney, Fred Warren Bennett, Pelton acknowledged that he was "prepared to do some negotiating" with top FBI officials, but he said he believed the subject of those negotiations would be his specific counterintelligence assignment.

A witness for the government also testified today that Pelton's use of the narcotic Dilaudid late in the afternoon on Nov. 24 probably would not have impaired his judgment during his second session with FBI agents that night.

Dr. Donald R. Jasinski, a clinical pharmacologist, testified that the Dilaudid, which Pelton injected about 5 p.m., would have elevated his mood and put him in a "dream-like state," but that its effects would have been "very minimal" by 10:45 p.m., when Pelton was called back to the Annapolis Hilton Hotel for a second interview with FBI agents. Pelton's admissions during that interview led to his arrest that night.

Pelton has testified that in addition to taking Dilaudid that afternoon at Barry's apartment, he drank about a half a fifth of vodka and had two triple-shot glasses of an orange liqueur.

Bennett has argued that the FBI, which had Pelton under surveillance, knew he had purchased drugs that afternoon and could have concluded that his reasoning powers would be impaired.

Before the trial resumed today for the sixth day, Judge Murray heard arguments from news organizations that have asked the court to make public a map on which Pelton allegedly circled, at the request of FBI agents, the spot where he told the Soviets that Project A was located.

Informed sources have told The Washington Post that Project A was a submarine operation to intercept Soviet communications in the Sea of Okhotsk, between the Kamchatka Peninsula and the eastern Soviet mainland.