By Angus McDowall and Hadeel Al Sayegh

RIYADH/DUBAI (Reuters) - Iran's nuclear deal with world powers on Tuesday will make the Middle East a "more dangerous part of the world" if it comes with too many concessions, a Saudi official told Reuters, signaling Gulf Arabs' deep unease over the accord.

The Saudis and their Gulf allies fear that the deal, by ending Iran's pariah status and freeing its economy from crippling sanctions, will embolden Tehran to step up its backing for their foes across the Middle East.

Saudi authorities offered only terse public comment on the Vienna deal, some 10 hours after it was announced, but officials privately made clear their misgivings about its likely impact in a region where the Sunni Muslim kingdom has long competed with Shi'ite Iran for influence.

While acknowledging that the deal would mean "a happy day" for the Middle East if it stopped Iran gaining a nuclear arsenal, the Saudi official said he feared it would instead allow Iran "to wreak havoc in the region".

"We have learned as Iran's neighbors in the last 40 years that goodwill only led us to harvest sour grapes," he told Reuters through a social network.

Saudi officials have publicly voiced only lukewarm support for the marathon talks, but in private have often argued that Iran cannot be trusted to keep to a deal.

Riyadh regards Iran's support for Syria's President Bashar al-Assad, Iraq's Shi'ite militias, Lebanon's Hezbollah and Yemen's Houthis as evidence that Iran wants to gain hegemony across the Middle East for itself and Shi'ite Muslim allies.

Commenting on the nuclear deal late on Tuesday, a statement on state media tersely stressed the importance of a strict inspections regime and the need to reimpose sanctions quickly if Iran failed to meet the conditions of the accord.

Saudi journalists, clerics and analysts were more forthcoming in setting out the country's fears, which are also fueled by a sense that Riyadh's main ally, Washington, now has divided loyalties after helping Iran to come in from the cold.

Story continues

"Iran made chaos in the Arab world and will extend further after the agreement, and the GCC (Gulf Cooperation Council) countries should reduce their confidence in America and turn their focus to Russia and China," said Mohammed al-Mohya, the news anchor on the state-run Saudi Channel 1.

WAR IN YEMEN

For months Saudi warplanes have been bombing Shi'ite Houthi forces in neighboring Yemen. It says they are being encouraged by Iran - an accusation rejected by Tehran.

"What I'm hoping for is that we won't end up having wars by proxy in the region, that Saudi Arabia will not feel pushed to fight indirectly wherever Iranian influence is," said Abdulaziz al-Sager, the Jeddah-based head of the Gulf Research Centre.

"If Iran is determined to expand its influence, and use sectarianism as its way to do that, then I think they will be pushing Saudi Arabia to go into war by proxy."

Riyadh gave Washington only a few hours' notice of its intervention in Yemen, a sign that it no longer looks unquestioningly to the United States as guarantor of its security and is prepared to push a more assertive foreign policy of its own.

"The 'Great Satan' and the Europeans have surrendered to Iran, the terrorist Iran has proved that it is in the right and they are in the wrong," tweeted Saleh al-Rajhi, director of the Center for American Studies at Riyadh's Institute of Diplomatic Studies.

He joked that it only remained for the United States to visit the grave of Iran's late revolutionary leader Ayatollah Ruhollah Khomeini, "to ask for his blessing".

"It is clear now that Americans are following their interests, irrespective of any historic promises given by the former leaders of both countries. Now the Obama administration is just looking at the ayatollahs," said Mohsen Al-Awaji, a Saudi Sunni Islamist activist.

U.S. President Barack Obama and Secretary of State John Kerry have held several meetings to reassure Gulf states in the culmination to the deal, most recently in May.

The United Arab Emirates and Kuwait have both congratulated Iran over the nuclear deal but in private they also remain wary. Oman, which brokered talks in 2013 that ultimately led to the deal, called it a "historic win-win".

(Additional reporting by Taghreed Almadani and Sandy Azmy; Editing by William Maclean and Gareth Jones)