Moscow — Iran's ouster of Soviet diplomats is unlikely to have shocked Moscow very deeply. The Soviets had already been revising their policy on the Gulf war to fit the failure of their bid to improve ties with Tehran in the post-Shah era.
But the expulsion announcement late May 4, and the banning of the Tudeh Party (Iran's pro-Kremlin communist party) an hour earlier, make it official: Soviet-Iranian ties are much worse than under the vocally pro-American Shah.
''Under the Shah, Tudeh was illegal, but our ties with the government were generally OK,'' notes a Soviet analyst of the Middle East. ''Now Tudeh is banned and our ties with the government are bad, too.''
Still, Moscow has so far avoided extreme responses to increasingly frosty treatment from Tehran - even to the crackdown on Tudeh, which a senior source here May 3 called very unfortunate, but ''ultimately an internal Iranian matter.'' When he spoke, a televised confession of ''spying'' for Moscow by the Tudeh Party's leader had already signaled the group's imminent demise.
Asked for an overall assessment of ties with Iran, the Soviet source said they were bad, with ''no chance'' of improving anytime soon. He added it ''is right'' to assume Moscow has been gradually warming to Iraq as relations with Iran cooled.
The main question raised by the May 4 announcement that Tehran was also expelling 18 Soviet diplomats is whether Moscow now will, or can practically, abandon relative restraint in signaling displeasure toward Iran.
Moscow does seem likely to react more muscularly to the ouster than to the crackdown on Tudeh. So far the latter has elicited only some sharp words from the official Soviet news media.
Amid the long decline in relations with Islamic Iran, Moscow has reacted more sharply on bilateral issues than on ''anti-Soviet'' turns in internal Iranian politics. For example, when the Soviet Embassy in Tehran briefly came under threat, Moscow filed a protest saying, in effect, that it would take steps to defend the mission if Iran could not.
But even on bilateral disputes, Moscow has shown reluctance to risk burning all bridges with Tehran. Moscow has signaled displeasure with Iran by edging away from neutrality in the Iran-Iraq war, but this shift, too, has so far been limited in nature.
There seem various reasons for this:
For one, Moscow is believed to be leery of strengthening the hand of those Iranians who may want gradually to restore ties with the United States. Amid Tehran's crackdown on Tudeh, the Soviets summoned the No. 2 man at the US Embassy here May 3 to protest alleged US ''slander'' about Soviet intentions toward Iran. The evident message to the Iranians: Remember, Washington is the real enemy.
Also, a full swing toward Iraq in the Gulf war - already the Soviets have resumed limited arms shipments to Baghdad - would not necessarily do Moscow unequivocal good in the area. Iraq may not yet be ready to reciprocate. Soviet-Iraqi strain predates Moscow's bid for better ties with Iran, as Iraq's execution of a number of communists indicated in the late 1970s.
A major swing toward Iraq could also conceivably complicate ties with Syria - Iraq's neighbor and traditional foe. Syria currently is Moscow's key ally in the Arab world.
Yet Western diplomats say a gradually more energetic shift away from neutrality in the Gulf war is one option if Moscow does choose to escalate its signals of displeasure toward Tehran. Another option would be reciprocal ousting of some Iranian diplomats - though the small size of Iran's mission here ensures there will be no one-for-one retaliation.