The United States and Iran are moving crab-fashion toward compromise over release of the 50 American hostages held for nearly three months in the US Embassy in Tehran.
The major outstanding difficulty is to get the two sides to agree on timing which would enable each to argue without loss of face that its basic demand has been met.
Until now, the US has said in effect: "Free the hostages first, and then we'll deal with your grievances about the Shah."
The Iranians have said in effect: "Meet our grievances about the Shah -- best of all, hand him over to us -- and then we'll free the hostages."
The catalyst at work pushing both toward compromise is the Soviet occupation of Afghanistan. This threatens both Iran's integrity and the US oil life-line out of the Gulf through the Strait of Hormuz.
Both sides, since that invasion, have quietly put out feelers toward each other. And, apparently sensing the change in climate, United Nations Secretary General Kurt Waldheim has cut short an extended tour of South and East Asia to return urgently to UN headquarters in New York.
The crisis over Afghanistan has been given as the reason for Mr. Waldheim's change of plan. But it is more likely caused by the need for a new move by him in his role as go-between in the crab-like progress of the Carter administration and Iran's Revolutionary Council toward a resolution of the hostage crisis.
From the US side, the most important public signal to date was contained in President Carter's written State of the Union message: "We have no basic quarrel with the nation, the revolution, or the people of Iran. . . . We are prepared to work with the Government of Iran to develop a new and mutually beneficial relationship."
Mr. Carter's acceptance of the revolution is particularly significant. It could be interpreted by Iranians as the thin end of the wedge of US acceptance of the legitimacy of what has happened in Iran and of the case against the Shah -- thought by many Iranians to have been sinisterly lacking hitherto.
Almost at the same time, the Administration in Washington let it be known that it was:
1. Postponing for at least a week implementing its own trade sanctions against Iran.
2. Dropping the idea of punishing Iran after any eventual freeing of the hostages.
But for the moment, domestic politics in this election year in the US dictate that Mr. Carter insist publicly that the hostages be freed unharmed before any deal with Iran. Similarly, domestic politics in Iran dictate that whoever is in control (and wants to remain there) insist on a meeting of grievances against the Shah before any deal with the US.
In Iran the candidates are jockeying for position in the last stage of the campaign for the presidential election Jan. 25. Any freeing of the hostages is unlikely before Iran has a new president -- and that might have to wait for a run-off in early February.
Two of the leading candidates, Finance Minister Abolhassan Bani-Sadr and Foreign Minister Sadeq Ghotbzadeh, in recent days have both spoken of the threat to Iran from the Soviet occupation of Afghanistan. Mr. Ghotbzadeh even said Jan. 20 there was need for "decisive action on the Soviet threat because now our borders are in danger."
The only existing counterweight to that threat is the power of the US. Perhaps both Mr. Ghotbzadeh and Mr. Bani-Sadr recognize this, but in the climate of today's Iran, it would be politically premature to say so openly.
Ayatollah Khomeini, now extending the period of rest and withdrawal announced a week ago, also appears to recognize the danger. In recent weeks he has gone along with various moves which are having the net effect of breaking the veto-power which the radical Islamic hostage-holders have hitherto had against a compromise formula for the hostages' release.
The hostage-holders hit back Jan. 22 by threatening to put yet another of the hostages, Barry Rosen, the Embassy press officer, on trial. But this does not detract from the overall impression of the past few weeks that the Revolutionary Council, the country's nominal government, has been making an unprecedented effort to get its act together and to lessen Iran's rudderless tossing in turbulent political waters.
There have been not only the moves to cut the hostage-holders down to size, but also a proposed constitutional amendment to meet minority grievances threatening to break up the country's unity. And now there is the apparent important reappraisal of eventual relations with the US.
It could still take time for younger Iranians to recognize from where the real threat comes. Russian violence to Iran over two centuries is for them a dull memory. Far fresher is the pain from what is perceived as two decades of humiliation at the hands of the US and its client, the now ousted Shah.
Reports about the exiled Shah having been placed under house arrest in Panama , significantly put out by the official Iranian news agency, can be seen as part of the backdrop for the movement toward compromise over the hostages; as part of an effort to make it appear that the revolution is getting even with the Shah. In the Iranian domestic context, it makes little difference that these reports have been denied in Panama itself.