As a dead man above ground, the shah of Iran united his enemies and divided the enemies of his enemies. The end that finally came in Cairo, accordingly, clears the air.

The regime of Ayatollah Khomeini now comes under pressure to govern with positive results. Forces at odds with that regime -- including, most definitely, the United States -- enjoy a new chance to review options and reshape policies.

The shah enters history, for better or worse, as a keeper of order in a turbulent part of the world. He held together for 35 years an empire that included, besides the Iranian plateau, borderlands populated by Kurds, Turks, Arabs, Baluchis and other submerged minorities. Iran, under his direction, linked forces with Turkey and Pakistan in a "northern tier" barring Russia's access to the Persian Gulf. When Britain left the Gulf, the shah established with Iraq and Saudi Arabia a regional balance of power.

In the end, his internal policies proved unequal to his international ambitions. He modernized rapidly, but on a shallow basis that ignored deeper realities of culture and religion. He relied on force, but lacked inner personal strength. Though many played a part, he was -- in his hesitation -- the principal author of his own undoing.

His departure from Iran, whatever the blame, left a void. The government of the ayatollah not only proved unable to maintain order around the edges of the empire. It also spread a revolutionary religious doctrine -- Pan-Shi-ism -- that worked to undermine authority in Turkey, Iraq, Afghanistan, Pakistan and the countries of the Arabian peninsula, including Saudi Arabia.

While the shah dragged on his days in illness and exile, no serious approach to these problems could be made. The rregime of the ayatollah, far from needing to govern effectively, fed off the wrongs suffered under the ousted monarch. It is typical that the Iranian radio broadcast announcing his death described him as "the bloodsucker of the century." Also, the people danced in the streets of Tehran.

But the dancing has to have a stop. With the shah gone, the regime has lost the threat of an imperial restoration that proved so useful in rallying support. The authorities in Iran have to deliver some positive results -- and that looks increasingly difficult.

The Iranian opposition, both inside and outside the country, stands to gain enormously. For with the shah out of the way, it is no longer split between those who opposed him all along and those who once served him. Still, he opposition depends on the outside world, especially the United States.

This country owns no moral debt to the shah. Strategic considerations spun the web of his international connections, and in the expression of national interest, countries behave like (in De Gaulle's phrase) "cold monsters." The question is what the United States, as a "cold monster," thinks about the regime in Iran.

While the shah lived, that question could not be put. Many Americans felt he was a "bad person" whose greed and brutality justified any excesses that followed. The Carter Administration both shared in those feelings and played on them to dump upon past presidents responsibility for everything that went wrong in Iran -- including the seizure of the hostages. Hence the effort to cut loose from the shah in seeking the return of the hostages. Hence, too, the markedly cool American cable of condolences to the dead monarch's family.

With the shah gone, Americans can finally begin to think hard about the Tehran government. They will note its increasing resort to terror inside Iran and outside. They will mark the spread of unrest to neighboring countries long in the sights of Soviet expansionism. They will register the increasingly harsh rebuffs to the supine efforts of the Carter administration to spring the hostages. They will gauge the loss of this country's prestige as a result of the administration's bootlicking approach. They will see that however important the hostages are in domestic politics, the United States has far larger interests at stake in Iran.

The conclusion has to be that the continuing existence of the ayatollah's regime runs counter to this country's enduring national interest. When that truth sinks home, the shah's long day's dying will not have been in vain.