What lies ahead? After all the surprises in the Middle East in recent months, many people are cautious about predicting what the region will look like after all the dust has settled from the gulf war.

There will obviously be some immediate changes, and not just in Iraq and Kuwait. But it is hard to say how permanent these changes will be and what effect they eventually will have on the region.Much depends on the shape of the postwar arrangements that are starting to be shaped. The score-settling that will take place across the Middle East adds another element of unpredictability.

The collapse of an Arab army on a scale recalling the Arab debacle of the 1967 Six-Day War brings more questions. That defeat at the hands of the Israelis shook the Arab world for years, producing extremism where many had expected moderation.

But this time some Arab forces were on the winning side, including soldiers from two of the three biggest losers in 1967: Egypt and Syria.

Those two countries, together with Saudi Arabia, are likely to enjoy increased authority and prestige in the Arab world in the wake of Iraq's defeat. But they each have their own agenda and will attempt to capitalize on the victory over Iraq in very different ways.

Egypt should be able to complete its return to the central role it played in the Arab world before making its despised separate peace with Israel. Egyptian moderation and experimentation with democracy could provide a constructive model.

Syria, on the other hand, has more parochial and less attractive goals. It has already taken advantage of the gulf war, for example, to tighten its grip on Lebanon.

In the past, Saudi Arabia has put a premium on Arab consensus, and it distributed oil money in indiscriminate fashion in an attempt to keep everyone happy. The gulf crisis exposed the perils of this strategy as Arab betrayed Arab and those who had long enjoyed Saudi patronage threw their support to Saddam Hussein. Saudi disappointment was keen.

The United States should also enjoy a stronger position in the Middle East, at least for a while. American concerns will carry more weight than in the past.

In the early 1980s, President Reagan sent Marines into Lebanon. After a protracted war-powers fight in Washington and a truck-bomb attack that killed 241 Marines in late 1983, Reagan withdrew the remaining troops.

The lesson for many in the Middle East was that the United States would back down in the face of serious challenge. Such miscalculations will be less likely in the Middle East for some time to come.

Israel is in a strong position for several reasons, not the least of which is the television image of Israelis in gas masks. This has generated sympathy and fresh appreciation for Israel's security needs.

The United States and its allies have been grateful to Israel for its restraint during the gulf war. Israel also has received some overdue credit for its decision to destroy an Iraqi nuclear reactor a decade ago.

Still, the Israeli population has been traumatized. That could accelerate its shift in recent years toward hard-line positions against the Arabs.

The moderate role Jordan's King Hussein abandoned in the gulf crisis had been the key to his survival. Jordan has a predominantly Palestinian population, and some people in the Middle East are wondering why the country shouldn't just be turned over to the Palestinians now. Some in Washington seem to be wondering, too.

The war underscored the need for the Arab world to move toward more democratic political systems. Unless it does, there will be future Saddam Husseins.