The Soviets Wednesday accused a U.S. military attache of spying and ordered him to leave the country in apparent retaliation for Washington's expulsion last week of a Soviet officer.

Foreign Ministry spokesman Gennady I. Gerasimov said Army Lt. Col. Daniel Francis Van Gundy III, an assistant military attache at the U.S. Embassy in Moscow, was given 48 hours to leave.Gerasimov said Van Gundy, who had been assigned to the embassy for about two years, the normal Moscow diplomatic tour, was declared unwelcome because he engaged in espionage.

The 42-year-old Army officer lives on the U.S. Embassy compound with his wife, Susan, and two of their three daughters.

On Thursday, U.S. officials accused Soviet Lt. Col. Yuri N. Pakhtusov of trying to buy computer secrets and ordered him to leave the country. They did not say how long he had to leave.

Gerasimov, at a hastily called briefing, charged that Van Gundy attempted "to enter a closed area, deliberately diverting from the officially permitted route, clandestinely photographed military sites and committed other gross violations" of the rules of diplomatic conduct.

U.S. Embassy spokesman Richard Gilbert said the Soviet charges were "unwarranted, inappropriate, without justification and certainly in no way in keeping with the positive tone of the U.S.-Soviet relationship."

Gilbert, the embassy press attache, suggested the Soviet action was in retaliation for the U.S. expulsion of Pakhtusov. In Washington, State Department spokeswoman Anita Stockman called the expulsion "unwarranted." She said "we are considering our response," but declined to elaborate.

Van Gundy refused to answer questions from reporters as he walked to his office. He specifically refused comment on Gerasimov's allegation that "warnings had already been issued to the lieutenant colonel."