DUBAI, UNITED ARAB EMIRATES, JUNE 14 -- Saudi Arabia's King Fahd has indicated he would like to end a bitter three-year-old dispute with Islamic rival Iran, a development that political analysts say could pave the way for a final peace settlement between Iran and Iraq.

"With Iran in particular, we have not rejected the principle of improving the atmosphere, and we even want to eliminate all cause for the current dispute," the king was quoted as saying by the Saudi newspaper Okaz. His comment followed conciliatory remarks last week by Iranian President Ali Akbar Hashemi Rafsanjani, who said he expected no solution to the dispute before the start of the annual Moslem pilgrimage to the holy city of Mecca later this month but foresaw progress after that.

Relations between the Sunni Moslem Saudis and Shiite Moslem Iran were strained in 1987 after Saudi security forces in Mecca broke up a riot touched off by Iranian political protesters. More than 400 pilgrims were killed, most of them Iranians.

Soon afterward, Saudi Arabia imposed a country-by-country quota on pilgrims to Mecca and banned political protests in the city. Iran has boycotted the Mecca rituals since then and said it will again this year. Saudi Arabia broke off diplomatic relations with Tehran in 1988, before the August cease-fire halted Iran's eight-year war with Iraq, citing Iranian interference in its internal affairs. Each has accused the other of heresy, corruption, and bad faith.

Iranian religious leaders have consistently argued that their late supreme spiritual leader Ayatollah Ruhollah Khomeini had an equal or better claim than Saudi Arabia to the title of guardian of Islam. "The Saudis will be looking for goodwill from Iran," during the Mecca pilgrimage, said one Western diplomatic analyst here. "If Iran keeps a low propaganda profile, then the way will be open."

Iranian political sources said that Tehran now saw no hope of progress towards peace with Iraq without first making up with Saudi Arabia, which supported the Iraqis with billions of dollars during the Gulf war.