The Soviet Union expelled a U.S. diplomat and his wife today in a move that reflected the badly strained relations between the two countries, now made even worse by the dispute over the shooting down of a South Korean airliner by Soviet fighter jets.

Within hours of the Soviet announcement, State Department spokesman Alan Romberg in Washington revealed that two Soviet diplomats had been expelled from the United States for espionage in mid-August, an indication that the expulsion of the two Americans was in retaliation.

Romberg also said the United States was "vigorously protesting the physical mistreatment" of U.S. Vice Consul Lon David Augustenborg, but declined to elaborate.

The announcement by the KGB state security police on the expulsion of Augustenborg and his wife Denise, who were stationed in Leningrad, coincided with a continuing propaganda barrage against the Reagan administration over its handling of the airliner affair. Soviet commentators have seized on the State Department's revision of transcripts of transmissions between Soviet fighter pilots and their ground control as evidence of inconsistencies in the U.S. case.

The KGB announcement, which was carried by the official news agency Tass, said that the two Americans were detained in the Leningrad area yesterday while "carrying out an act of espionage." It said that Augustenborg had been declared persona non grata.

"Evidence was obtained in the course of an investigation which fully exposes the U.S. diplomat and his wife as being engaged in intelligence-gathering activities incompatible with their official status," the KGB statement said.

A spokesman at the U.S. Embassy in Moscow confirmed that Augustenborg worked at the U.S. Consulate in Leningrad but refused to reveal any other details about either the incident or his career. He declined to say when the Augustenborgs had arrived in the Soviet Union.

While there was no evidence that the case was directly linked to the dispute between Moscow and Washington over the South Korean plane, western diplomats here said that the present climate made it easier for the Soviets to make such a decision.

Augustenborg is the third U.S. diplomat ordered to leave the Soviet Union this year. The authorities expelled Richard Osborne, a first secretary at the U.S. Embassy, in March, saying he had been caught with a portable electronic transmitter and special soluble paper.

In June, Louis C. Thomas, an embassy attache, was ordered to leave after the Soviet government said he had been caught "red-handed during a spy action in Moscow."

Before these two cases, the last time the Kremlin publicly identified a U.S. diplomat as a spy is believed to have been in 1978. It is comparatively rare for Moscow to publicize espionage charges so swiftly.

Scores of Soviet diplomats have been ordered out of western countries, including the United States, during the last few months. The biggest single sweep came in April when the French government expelled 47 Soviet officials after accusing them of systematic military and industrial espionage.

The government of the Irish Republic ordered two Soviet diplomats and the wife of one of them to leave Dublin last Friday. Several dozen Soviet officials have also reportedly been expelled from Thailand in the last two weeks.

Meanwhile, the announcement by the State Department that the Soviet fighter pilot reported firing "cannon bursts" to his ground control before shooting down the South Korean airliner has been seized upon by Soviet commentators as an admission that warning shots were fired.

Tass said today that the revised transcript of the conversations proved that Washington was "getting ever more entangled in its own lies."

"It becomes ever more obvious that this anti-Soviet hullabaloo is built on lies, on a crude, brazen distortion of facts," Tass said, adding that the U.S. recordings were "falsified from beginning to end."

The Associated Press reported the following from Washington:

The two Soviets expelled last month were identified as Yuri Petrovich Leonov, an assistant air attache, and Anatoly Yevgenyevich Skripko, an attache. Both were declared persona non grata "for engaging in espionage," Romberg said.

Leonov was declared persona non grata on Aug. 19 and Skripko was declared persona non grata on Aug. 17.

A State Department official, who insisted on anonymity, said the expulsions were not previously announced, reflecting a customary silence on expulsions.

But he said the decision to announce them today was made because the Soviets disclosed the expulsion of the U.S. diplomat in Leningrad on spying charges.