A congressional inquiry into security at the U.S. Embassy in Moscow was told yesterday that Marines guarding the legation were ordered not to search Soviet construction workers building the new embassy complex, which has since been found to be riddled with bugging devices.

According to retired Marine colonel David Mabry, who oversaw the embassy guard program from mid-1982 to 1985, guards were told not to demand identification from people outside the ambassador's office in the embassy and were prevented from screening those attending embassy church services.

Guards were told not to check toolboxes and bags of Soviet workers because this would "hold up construction," he said. If they saw someone on the site at night they could not apprehend him but had to file written reports, he said.

Mabry described the security system at the embassy as "the worst" he had seen in tours of 108 U.S. missions, and blamed then-Ambassador Arthur A. Hartman for what he called the "breakdown" in security.

Construction workers had "license to bring anything into the compound, such as listening devices . . . they could place them anywhere they wanted to in the embassy," Mabry said.

He said he visited the embassy in 1983 and interviewed 12 Marine guards who had misgivings about security arrangements there, and that the State Department ignored a report he made later.

In August 1985, the administration stopped construction on the new embassy when it was found to be infested with bugging devices, some even planted inside precast building materials. Part of the building, begun in 1979, may have to be destroyed to rid it of the devices.

"If you tie their hands it is very difficult" for the Marines to keep the embassy secure, said Rep. Beverly B. Byron (D-Md.), chairman of the House Armed Services military personnel subcommittee. Marine guards receive their orders from Regional Security Officers, who are State Department employes, at foreign missions.

"I'm beginning to think . . . we have got the Marines in the position of being scapegoats," Rep. Richard B. Ray (D-Ga.) told the panel.

Meanwhile, in the espionage trial of Sgt. Clayton J. Lonetree, a naval investigator said the 25-year-old Marine guard was urged to lie during questioning.

David Moyer, a special agent of the Naval Investigative Service (NIS), told Lonetree's court-martial that during an interrogation session, he heard NIS agent Thomas Brannon say to Lonetree, "Tell us a lie." But Moyer denied the invitation was intended to encourage Lonetree to make false statements, calling it only a tactic to keep him talking.

The admission came on the sixth day of Lonetree's military trial at the Quantico Marine Base, Va., on espionage and related charges arising from his service as a guard at the U.S. Embassy in Moscow between September 1984 and March 1986.

At the center of the prosecution case are statements by Lonetree in which he told NIS agents he had had an affair with a Russian translator for the U.S. Embassy and handed information to the Soviets.

The defense challenged the validity of the statements, saying they had been coerced and proper legal procedures violated.

Defense attorney William M. Kunstler asked whether at some time in the course of the interrogation Brannon had said to Lonetree: "Clayton, talk to us -- hell -- say something, tell us a lie."

Moyer said the statement had been taken out of context, but added: "A statement similar to that was said." He said it came at a time when the investigator felt he was "withholding information."

Kunstler went on: "What was the point of telling him to lie -- was it to get him to talk again?"

Moyer replied: "That is correct."

Moyer testified that the NIS was called to investigate last December, after Lonetree had approached an agent from another U.S. agency in Vienna, where he was posted after Moscow. He told the agent, identified in court as Big John and understood to be a CIA agent, that he had had contact with the Soviets while serving in the Moscow embassy.

Moyer said NIS agents were given details of debriefings with Lonetree by Big John and another agent from the other U.S. agency.

He described how for five days over Christmas four NIS agents conducted a series of interrogations with Lonetree in hotels in Vienna, and then at a Holiday Inn near Heathrow Airport, London.

Moyer said the agents had fully informed Lonetree of his rights and made their identities clear. He said it was not until the fifth day of questioning that Lonetree called for a lawyer, and at that point, the interrogation ceased and Lonetree was flown back to the United States.

Moyer said Lonetree once remarked, "I know I'm going to jail, but I don't know how long for. The one thing that concerns me is that I have let down my buddies in the Marines."

Speaking outside court, Kunstler said Moyer's testimony revealed that the investigation had been "tainted" from the start, based on information provided by Big John and members of the other U.S. agency in Vienna.

Kunstler said the NIS agents had failed to clearly identify themselves to Lonetree when they arrived on the scene. "Lonetree thought he was being questioned by the same people he had gone to for advice."