MOSCOW — When Secretary of State James A. Baker III told Eduard A. Shevardnadze, the Soviet foreign minister, that Iraqi forces had just invaded Kuwait, Shevardnadze was outraged and mortified.
"This is what 40 years of our policies in the Middle East have come to," he angrily told an aide later. "Those were our tanks, and for all we did to prevent this, we might have been in them ourselves."
For Shevardnadze, who had been meeting with Baker in the Siberian city of Irkutsk when Iraq, a longtime Soviet ally in the Middle East, seized Kuwait on Aug. 2, it seemed the nadir of his efforts to reshape Soviet foreign policy as a key part of perestroika , as President Mikhail S. Gorbachev's reform program is known.
"We have come so far, done so much, and yet here we were on the brink of a catastrophe, an international conflict of immense dimensions and even a nuclear potential," a senior Foreign Ministry official recalled.
"It was not that all we had achieved might have gone for naught, but that we seemed to have stepped into one of those worst-case, nightmarish scenarios in which the world gets ready to go to war."
Shevardnadze resolved, the official said, that "we must set things right, reverse the aggression, settle the problems that underlay it and deal with the other conflict situations in the region."
"Our 'new political thinking,' we knew, was going to be tested and tested very hard, and we must make sure that it not only survives but demonstrates its effectiveness in this crisis," commented Viktor A. Kritinyuk, deputy director of the U.S.A. Institute, a leading Soviet think tank.
"If our policies could not cope and the crisis grew, then it could be argued that they were dangerously ineffective and should be abandoned. . . . If we have shown surprising determination, that is the root of it. We were in danger of dithering, and to do so would compound the crisis."
This resolve, a reflection of Shevardnadze's commitment to reinforcing what Moscow calls "new political thinking," is now repositioning the Soviet Union in the Middle East in some of the fastest changes in Soviet foreign policy under Gorbachev.
It is also strengthening Soviet-American rapprochement. Cooperation has visibly replaced competition in the Middle East, where wars have historically triggered confrontations between Moscow and Washington. Diplomats from both countries now discuss ways in which they can work together elsewhere to create "a new world order."
"However dangerous the gulf crisis may be in itself and however important it is to settle it," Yevgeny M. Primakov, Gorbachev's chief foreign policy adviser, said last week, "I think we should proceed from the fact that it offers a kind of laboratory, testing our efforts to create a new world order after the Cold War."
In responding to the crisis in the Persian Gulf over the past two months, the Soviet Union has made a number of such major moves, each of which would have made headlines alone in previous years; together, they constitute a dramatic shift in Moscow's posture in the Middle East. Among them:
* The Soviet Union condemned Iraq's action unequivocally, and it immediately halted arms shipments to Baghdad.
Objections to the policy came from many Soviet specialists in the Middle East, from the military and from die-hard conservatives. They opposed criticizing a "revolutionary" ally and acquiescing in American military intervention in a region long regarded by the Kremlin as strategic and sensitive. But the critics were overruled after a rare public debate on foreign policy.
Moscow's stand put its relations with many other Third World countries on a different basis. No longer, Moscow made clear, would it tolerate the use of military force in international disputes, particularly when it had supplied the arms, and no longer would it acquiesce in the intervention by radical regimes in other countries to establish "progressive" governments.
"Liberation forces throughout the world, including in Arab countries and the Palestinian people in particular, cannot see the Soviet Union as a friend or ally," said Abdullah Hourani, a member of the Palestine Liberation Organization's executive committee, criticizing the new Soviet stance.
* The Soviet Union worked with the United States to shape one resolution after another at the U.N. Security Council, laying down the fundamental demand that Iraq withdraw its troops immediately, unconditionally and completely, and that Kuwait's sovereignty and legitimate government be restored.
Shevardnadze himself chaired the Security Council meeting that imposed an air blockade on Iraq, and he warned Iraq in the U.N. General Assembly of the organization's power to "suppress acts of aggression" with military force, if necessary.