Egypt's Anwar Sadat frustrated a generation of Soviet strategy in the Middle East by switching Cairo's alignment from Moscow to Washington. Now the Kremlin, Soviet sources make it clear, is determined to try to recoup that loss and humiliation.

As a consequence, a new, volatile version of one of the oldest dangers in the region has been injected into the American-Soviet rivalry. It is the danger that the two superpowers may be thrown into a collision, this time by Soviet attempts to redress or nullify the advantages gained for the United States in the Middle East power balance by Sadat's abandonment of Egypt's close ties to the Soviet Union in the mid-1970s.

Sadat's assassination supplies the Kremlin with a windfall. Soviet strategists have been given a new opportunity to try to thwart the completion of Sadat's American-supported goal of Egyptian-Israeli peace before that plan can be cemented in place irrevocably.

With the loss of Sadat's rare combination of statecraft and stagecraft, the odds inevitably have increased against the likelihood of uniting and fulfilling the differing versions of an overall Arab-Israeli settlement envisioned in Cairo, in Jerusalem and in Washington.

Firm pledges have come from Sadat's designated successor, Hosni Mubarak, of fidelity to Sadat's goal of peace set out in the Camp David accords of 1978, reinforced by matching recommitments from President Reagan and Prime Minister Menachem Begin. On the opposite side, however, the wealth of forces in the Middle East, and in Egypt itself, that are hostile to the Sadat vision have greater potential for disruption than ever before.

The Soviet temptation to exploit this array of anti-Sadat, anti-Israeli, and anti-American nations and factions in the Middle East, is bound to be great. Sadat's Egypt was not only the nemesis of Soviet strategy in the Arab-Israeli conflict; it had become in the last two years the pivot of American strategy for building a rapid deployment force to checkmate the Soviet Union throughout the Middle East-Persian Gulf area.

But there is one critical, unchanging factor in the superpower rivalry that in the past has overshadowed all prospective scenarios for the exploitation of chaos in the region. That is the high risk that violent change will rebound in unforeseen directions. For no matter how much the United States and the Soviet Union have sought to frustrate each other in the Middle East in recent decades, that danger has been a paramount concern for strategists on both sides.

In 1970, for example, at the height of the Vietnamese war, the Nixon administration conceded in its annual foreign affairs report:

"Vietnam is our most anguishing problem. It is not, however, the most dangerous. That grim distinction must go to the situation in the Middle East with its vastly greater potential for drawing Soviet policy and our own into a collision that could prove uncontrollable."

There has been abundant evidence over the years that the Soviet Union shared similar apprehensions about stumbling into a collision with the United States in the Middle East, especially through the actions of a client state.

Many Americans are unaware that Sadat concluded that the Soviet Union would never provide him with enough weapons to defeat Israel conclusively, for fear that such aid would propel the Soviet Union into a war with Israel's protecting superpower, the United States.

That was the dominant reason cited by Sadat for his break with the Soviet leadership, which from 1955 onward had made Egypt the fulcrum of its interest in the Arab world, supplying it with billions of rubles worth of military and economic support.

Throughout the years of arguing with the Soviet Union behind the scenes over the adequacy of its weapons shipments to Egypt, Sadat related in his memoirs, the Soviet leadership held back on its most potent aircraft and missiles for attacking Israel, so the Kremlin could retain control over the level of combat.

Sadat said he argued in vain with Soviet leader Leonid Brezhnev and other senior officials that "we never sought to initiate a confrontation between the Soviet Union and the United States." But the Soviet leadership evidently was never prepared to entrust to Sadat the critical judgment on deciding what might push the United States over the brink.

When Sadat made his dramatic decision to expel 15,000 to 20,000 Soviet military advisers from Egypt in July 1972, he had decided that the Soviet Union could not deliver on either of his dual objectives: to overwhelm Israel militarily or otherwise force it to return the Egyptian territory it conquered in the 1967 Six-Day War.

Even so, the expulsion of the Soviet military advisers was by no means the conclusive rupture with the Kremlin that it was construed to be in the West. Instead, the eviction of the advisers was part of Sadat's secret strategy for eliminating Soviet restraints on subsequent Egyptian military actions in what became the 1973 Yom Kippur war against Israel.

The Sadat strategy, in effect, manipulated both superpowers. It employed Soviet weaponry to crack Israel's belief in its military invincibility. After winning back from Israel in the 1973 war enough territory to gain effective bargaining leverage, Sadat then reversed alliances, turning from the Soviet Union to the United States to put pressure on Israel to yield all captured Egyptian territory.

As recounted by Sadat in his memoirs, "In Search of Identity":

"Within the strategy I had laid down, no war could be fought while Soviet experts worked in Egypt. The Soviet Union, the West, and Israel misinterpreted my decision to expel the military experts and reached an erroneous conclusion which in fact served my strategy, as I had expected -- that it was an indication that I had finally decided not to fight my own battle. That interpretation made me happy; it was precisely what I wanted them to think."

After Sadat ejected the Soviet military advisers, Egypt actually received "the biggest arms deal" it ever concluded with the Soviet Union, Sadat wrote, as the Soviet Union sought to preserve what it could of its heavy investment in Egypt. Those weapons enabled Egypt to launch the massive surprise attack on Israel in l973, with both the Soviet Union and the United States then joining in orchestrating a cease-fire to preserve the interest of their respective clients. Even then the United States and the Soviet Union came close to a military collision before the cease-fire lines were stabilized.

With that outcome, the Soviet Union essentially had fulfilled the role that Sadat's strategy had allotted it. In Sadat's own calculating brand of realpolitik, complemented by Henry Kissinger's and the Kissinger "shuttle diplomacy," the Soviet Union was virtually excluded from the subsequent negotiations. To Moscow's dismay, the United States became Egypt's patron and de facto ally, as well as Israel's.

Sadat's conviction that the United States ultimately would compel Israel to surrender its captured Egyptian territory, however, was strained to the breaking point by October 1977.

To Sadat's alarm, and even more so to Israel's, the Carter administration joined the Soviet Union to pledge joint action to push the Arab nations and Israel into a "comprehensive settlement" at a conference to start in Geneva "not later than December 1977."

In the resulting uproar from Israel's supporters in the United States, that formula, announced on Oct. l was virtually abandoned by the Carter administration by the early morning of Oct. 5. Nevertheless, for Sadat, that was a continuing threat -- the danger of being driven into an open-ended conference where the Soviet Union, alienated from Egypt, would have an equal voice in setting the pace for a settlement. To Sadat that was a recipe for endless stalemate. The result was the audacious initiative in November in which Sadat appeared before Jerusalem's Knesset to offer peace to Egypt's historic enemies.

It is significant that through all the intervening years, and now again, it has been the spurned formula of October 1977 to which the Soviet Union has sought to return as the alternative to the Camp David plan of l978 for an Arab-Israeli settlement. That formula is unacceptable to all participants in the Camp David plan. Its continuing pursuit by the Soviet Union, nevertheless, at least signifies that the Soviet Union cannot produce a peace settlement on its own, and equally, it cannot be oblivious to the risks of superpower collision in the Middle East.