QUANTICO, Va. (AP) _ The government closed this morning's proceedings in the espionage court- martial of a former guard at the U.S. Embassy in Moscow to conceal the identity of an intelligence official testifying in the case, officials said today.

A statement released by officials at the Quantico Marine Base said that the fifth day of the sex-for-secrets court-martial of Marine Sgt. Clayton Lonetree would resume behind closed doors.

''The reason the hearing is closed is due to the nature of the witness and the testimony,'' said Chief Warrant Officer Randy Gaddo today. Gaddo said he could say only that the witness is an ''intelligence official.''

On Monday, defense lawyers began their battle to have statements by Lonetree thrown out, arguing that Lonetree talked to Naval Investigative Service agents without being adequately advised of his rights.

''They closed the hearing in order to protect the identities of two witnesses and in order to keep their testimony from the public,'' said defense lawyer William Kunstler said. He declined to further identify the witnesses. He said they were to be followed by NIS officials, who might testify in open court.

The military, meanwhile, was to resume a separate hearing this morning to determine if another former guard at the U.S. Embassy in Moscow, Cpl. Robert J. Williams, should face court-martial for recanting sworn statements made in the investigation of the spy scandal at the embassy last winter.

Lonetree, 25, of St. Paul, Minn., faces 13 charges, the most serious being espionage. The first Marine to stand court-martial for espionage, he faces a life sentence if convicted.

Military prosecutors say Lonetree's love affair with a female Soviet translator led to his turning over classified information to Soviet agents.

His attorneys have said he turned over no information that could hurt the United States and have questioned the need for closed proceedings.

''I think that's all pure hogwash to prejudice the case, the jury, as well as the American people that Clayton did horrendous espionage damage to the United States,'' Kunstler told reporters Monday.

Kunstler also sought Monday to obtain a new Article 32 hearing for Lonetree. The Article 32 hearing is held to determine if defendants must stand court-martial. Kunstler said Lonetree's hearing was improperly closed to the public.

The military prosecutor, Marine Maj. David L. Beck, said that national security interests were at stake. He also pointed out that the Article 32 hearing is similar to a civilian grand jury proceeding, which is required to be kept secret.

Navy Capt. Philip F. Roberts, the trial judge, sided with prosecutors, as he has on nearly every defense motion.

An Article 32 hearing was to resume today for Williams, 22, a native of Kingston, Jamaica, who enlisted in the Marines from New York.

In Monday's testimony, NIS agent Dennis Estep said Williams made two sworn statements and a third statement that he refused to sign when questioned in April in Vienna about the embassy spy allegations.

The military wants to try Williams on charges of making false statements in connection with the espionage investigation, perjury, and impeding the espionage investigation.

His Article 32 hearing was begun July 13 and was opened to the public on Monday. Marine Maj. Ronald McNeil, the investigating officer presiding over the hearing, said he hopes to wrap it up by the end of the week.