* President Rouhani has said he wants warmer ties with Saudi Arabia
* The two rivals back opposing forces across the region, including in Syria
* Rouhani is constrained in foreign policy by Supreme Leader Ali Khamanei
By Angus McDowall and Yeganeh Torbati
RIYADH/DUBAI, Aug 13 (Reuters) - Saudi Arabia's King Abdullah's disdain for Iran leaps from U.S. embassy cables. "May God prevent us from falling victim to their evil," he told U.S. officials, according to a cable released by WikiLeaks. According to another, he told his own diplomats he wanted Washington to "cut off the head of the snake".
On the other side of the Gulf, Iran's contempt for Saudi Arabia crackles through a report on its hardline Mashregh website. The kingdom's ruling family, it said, was "drowning in corruption and prostitutes".
Into this toxic environment steps Iran's newly inaugurated President Hassan Rouhani, promising to improve what may well be the single most venomous and destructive relationship in the entire Middle East.
It is almost impossible to overstate the hatred between Sunni Saudi Arabia and Shi'ite Iran, which has fuelled a decade of violence across the region.
In Syria, Iraq, Lebanon and Yemen, the two sides back sectarian proxy forces that are either at daggers drawn or openly at war in conflicts killing thousands each month.
In Syria, each accuses the other of responsibility for a bloodbath, with Iran supporting President Bashar al-Assad and Saudi Arabia funding the rebels trying to overthrow him. In Iraq, sectarian violence is at its worst since 2008.
Riyadh accuses Tehran of fomenting trouble in Bahrain and even Saudi Arabia itself. Tehran accuses Riyadh of plotting its destruction with Washington.
Nevertheless, Rouhani, a comparative moderate after the firebrand Mahmoud Ahmadinejad, says he wants to make friends with Saudi Arabia. Encouragingly, he brings personal experience negotiating with Riyadh.
"God willing, I hope that we will have very good relations with neighbours, particularly with Saudi Arabia during the next government," Rouhani said at a June press conference.
Still, few believe he can draw the poison out of the Cold War-style rivalry at the heart of the Middle East.
COCA-COLA VS. PEPSI
Both countries have vested interests in talking to each other: Saudi Arabia wants Iran to end what it sees as meddling in Arab countries - supporting Shi'ites or their allies in Syria, Iraq, Lebanon, Bahrain, Yemen and Saudi Arabia itself.
Tehran wants Riyadh to stop urging military action against its atomic sites and helping Western sanctions by increasing oil supplies to make up for embargoed Iranian crude.
Both Rouhani and King Abdullah have shown willingness to make peace in the past.
As head of Iran's Supreme National Security Council in 1998, Rouhani sat up all night with Abdullah's late brother, the former interior minister Prince Nayef, to negotiate a security agreement with the kingdom after years of friction.
In signing that deal, King Abdullah chose to overlook Saudi and U.S. suspicions that Tehran was behind the 1996 bombing of an American barracks in the Saudi city of al-Khobar. Iran put aside memories of the 1987 Muslim pilgrimage, when hundreds of its pilgrims were killed in clashes with Saudi security forces.
"King Abdullah has known Rouhani for some time. I think they have a decent relationship. Much better than his relationship with Ahmadinejad. They will have some ability to communicate with a degree of respect," said Robert Jordan, U.S. ambassador to Riyadh from 2001-03.
But while that history may indicate more of an openness on both sides to cooperation, analysts and regional officials and diplomats see little chance of rapprochement.
The circumstances are far uglier now than they were when the security deal was agreed 15 years ago, with the region embroiled in civil wars and uprisings.
In March 2009, Iran's Foreign Minister Manouchehr Mottaki visited Riyadh in a bid to cool tensions between the rival states, but his meeting with King Abdullah did not go well.
Abdullah told U.S. counter-terrorism adviser John Brennan a few days later that he had told the Iranian foreign minister: "You as Persians have no business meddling in Arab matters".
"Iran's goal is to cause problems... there is no doubt something unstable about them... may God prevent us from falling victim to their evil," Brennan said he was told by the king, according to a cable released by WikiLeaks.
On Iran's side, foreign policy is determined less by the president than by Supreme Leader Ayatollah Ali Khamenei, which means that the election of Rouhani is unlikely to fundamentally alter Tehran's positions.
"Is it possible for anyone to do anything or say anything without the opinion of the supreme leader?" said outgoing Foreign Minister Ali Akbar Salehi in an interview with the Mehr agency, adding he had been blocked from visiting Riyadh.
Riyadh does not sound hopeful. Abdullah al-Askar, chairman of the foreign affairs committee in Saudi Arabia's Shoura Council quasi-parliament, compared the difference between Rouhani and Ahmadinejad to that between "Coca-Cola and Pepsi".
"I don't think he'll do the same as Ahmadinejad, speaking out harshly," he told Reuters. "But when it comes to the main files I think he has to work within a framework that's drawn by Khamenei."
The daily Saudi Gazette editorialised last week: "Tehran is up to the same old tricks, but with a different conjurer."
TRIBUTE TO THE ENEMIES
For Saudi Arabia, any improvement in relations would depend on Iran cutting its support for Syria's Assad, whose assault on rebel-held areas has been likened by Foreign Minister Prince Saud al-Faisal, Abdullah's nephew, to genocide.
Such a move would likely be a red line for Iran's leaders, who appear to see Syria as a key link in their ability to project influence across the Middle East as far as Lebanon and the borders of Israel.
What irritates Iran more than Saudi Arabia's policy in Syria is Riyadh's decision last year to boost energy exports to replace oil taken out of the market by embargoed Iranian crude, effectively colluding with Western sanctions.
"Instead of serving Muslims, they pay tribute to the enemies of Muslims and stand next to them," said Nasser Soudani, deputy head of the Iranian parliament's energy committee in January 2012, commenting on higher Saudi oil supply.
Closer to home, Saudi Arabia accuses Iran of trying to foment trouble among its own Shi'ite minority, of planting a spying ring in the country and of attempting to assassinate its ambassador in Washington. Tehran has denied all those charges.
The antagonism dates to 1979, when Iran tried to export its Islamic revolution to Shi'ites across the Middle East, including in Saudi Arabia, threatening the old balance of regional power.
Saudi Arabia and other Gulf states then made what Tehran saw as a pact with the devil by siding with Saddam Hussein after he invaded Iran in 1980, financing his war for eight years while he used chemical weapons on Iranian troops and civilians.
After a gradual thaw, the U.S.-led ousting of Saddam in 2003 ignited a new struggle for mastery between Sunni and Shi'ite Iraqis, with Riyadh and Tehran backing opposing sides.
The sectarian edge to their struggle has sharpened in recent years. Both countries define themselves according to Islam and clerics in both regard the other with open disdain.
Today, Iran's Persian-speaking rulers back Shi'ites across the Arab world, including the government and militia in Iraq, Lebanon's Hezbollah, Bahraini protesters against that country's Sunni ruling family and Yemen's Houthi rebels. Syrian President Assad is from the Alawi sect, a Shi'ite offshoot.
Saudi Arabia, the birthplace of Islam and proponent of its most conservative Sunni school, Wahhabism, backs the other side in each of those regional struggles.
The Wahhabi school denigrates Shi'ism as heretical. Its first Bedouin adherents rampaged through 18th century Iraq, smashing the sect's shrines.
King Abdullah has tried to moderate that view. Last year he said he would set up a Riyadh centre to study differences between sects. But he himself was recorded criticising Shi'ites for "worshipping domes, statues and individuals" in a 2006 WikiLeaks cable.
For their part, Shi'ites regard Wahhabism as a dangerous, radical creed that fuels militant sectarianism. The war against Assad has given a new foothold to Sunni al Qaeda fighters who use theology to justify attacks on Alawite and Shi'ite civilians in both Syria and Iraq.
"Saudi Arabia has created the new al Qaeda," said analyst Mohammad Sadeq al-Hosseini in a July interview with Iran's conservative Fars News Agency, referring to Riyadh's support for Syria's opposition.
Gulf diplomats say Riyadh has worked to avoid letting its arms or money go to militant Islamist groups within Syria's rebel coalition.
With Rouhani unlikely to switch the Iranian policies that Saudi Arabia most bitterly opposes, there appears little scope for progress beyond a less aggressive public tone.
"The level of damage done in the past eight to 10 years is phenomenal. It begs the question as to whether the Iranians think they can get away with window dressing or are willing to make real changes," said Ali Ansari, professor of Iranian history at Britain's St Andrews University.
However, Iranian moves such as using more conciliatory language in media broadcasts about Bahrain and other Gulf states and ending support for Yemeni groups might cool the situation.
"Syria may be a bridge too far, but it's certainly possible they could reach some sort of tentative understanding on the Shi'ite situation in Bahrain. The crown prince there is in a better position to negotiate and may be inclined to assist in a resolution," said Jordan, the former U.S. ambassador in Riyadh.
Diplomats in the Gulf still say they expect little movement on even the more peripheral issues and little chance of Riyadh bending to Iranian overtures without big policy changes.
But even such entrenched scepticism has not stopped Iranian reformists pushing for Rouhani to extend an olive branch to Saudi Arabia, a policy pursued by former presidents Akbar Hashemi Rafsanjani and Mohammed Khatami.
"The situation in Syria has become so complex that the Islamic world has practically been split in half, to the point that a proxy war is taking place," said Iranian reformist Saeed Hajarian in a newspaper interview this month.
"We have to show them that this is not a Shi'ite-Sunni war. With all of our power we must stop the parties from religious incitement," he said. (Reporting by Angus McDowall and Yeganeh Torbati; Writing by Angus McDowall; Editing by Jon Hemming and Peter Graff)