The Arab states of the Persian Gulf edged cautiously away from open support for Iraq and toward a more neutralist position on the Iran-Iraq war today as a summit of their leaders looked with alarm at the recent escalation in thefive-year-old conflict.

In their final communique, heads of state from Saudi Arabia and the five other Gulf Cooperation Council member countries pledged to continue working toward a peace that would "preserve the rights and legitimate interests" of both Iran and Iraq.

There was little indication of what the Saudis, Kuwait, the United Arab Emirates, Bahrain, Qatar and Oman could do in concrete terms to bring about the peace they have hoped for in five previous summits.

But the Arab royalty of the gulf appeared intent on reassuring both Iran and Iraq of their good intentions at a crucial moment, in hopes that the act of dialogue could keep the war from spreading across their borders.

Their own forces could be vulnerable to a frontal attack and all are concerned about the rising threat of terrorism. Kuwait's Emir Jabir Ahmed Sabah narrowly missed assassination by a suicide bomber on May 25.

But plans for their own mutual defense and security agreements remained vaguely stated, and no new accords were signed, according to summit spokesmen.

"In this region we cannot but coexist with all," said Secretary General Abdullah Bishara at a press conference tonight.

"We would like to assure that the gulf coexists through contacts and dialogue," Bishara continued, suggesting that no side should try to impose changes on the region. He spoke of "shifting the role" of the council "in a collective way to arrest the escalation of the war" and seek its end.

During a similar initiative three years ago, Kuwait and the Emirates sent top-level delegations to Iran. Last spring the Saudi foreign minister spoke with top officials in Tehran, and senior Iranian officials have made quiet but increasingly frequent trips to the Emirates.

"We are on the front line," Bishara said. If there was little progress before, "this doesn't give us an excuse to stop."

In peace, the sheiks, sultans, princes and kings of the gulf have had reason to fear the revolutionary Arab regime in Iraq as well the leaders of Iran.

Today, their statements about both sides were muted and oblique. They refused to criticize Arab Iraq directly, but the way they spoke of the dangers posed by the rising tempo of warfare in the gulf seemed a pointed reference.

The current escalation began in August, when Iraq began a series of major attacks on Kharg Island, Iran's main oil shipping terminal. Iran has responded by stopping and searching ships in the gulf and confiscating any items they believe might be transshipped to Iraq as war materiel.

The council's communique criticized Iran by name. But it did so by calling on Tehran to observe the principles of U.N. Security Council resolutions passed after previous escalation in 1983 and 1984. These attempted to assure freedom of commercial shipping and forbid attacks on economic installations along the gulf's coasts.

Although Iraq frequently attacks oil tankers carrying Iranian crude, it endorsed the U.N. resolutions and several mediation efforts and has maintained for years that its only goal is to force Iran to talk peace.

Iran, however, repeatedly vows to fight until Iraqi President Saddam Hussein is gone because he launched the war by invading Iran in 1980 after the Ayatollah Ruhollah Khomeini came to power.

Even as the four-day conference was under way here at the southern end of the gulf, in the north, Iraq launched major air attacks against the Iranian industrial city of Ahwaz and reportedly set ablaze a Greek supertanker with an Exocet missile.

The summit took place in an atmosphere of opulent festivity that held little suggestion of such dangers or the increasingly shaky economic future the council members face even without the war.

Saudi King Fahd and the rest were entertained by Oman's Sultan Qaboos last night with a lavish fireworks display between the castles and cliffs overlooking Muscat harbor. They conferred in a newly completed hotel nearby that reportedly cost more than $220 million to build, with a domed interior worthy of the Taj Mahal and gold bathroom fixtures in royal suites.

But all have built their prosperity on high oil prices that are now in decline. Many have seen their populations burgeon with potentially restive immigrants needed as a basic work force. Few have developed the democratic political institutions that might absorb the shock if rising discontent accompanies lowered economic expectations.

Bishara talked tonight of dialogue, defense, security and economic cooperation as a "package deal" that the council is addressing as a whole. But such potentially sensitive issues among the council members as oil pricing and border disputes were not even discussed, according to Omani Information Minister Abdelaziz Rowas.

Timetables were set for ministerial councils to work out agreements on agricultural strategy, industrial development, education and the environment.