U.S. President Barack Obama walks out with two bags of cheesecake from Junior's Restaurant next to Democratic Mayoral candidate Bill de Blasio in Brooklyn, October 25, 2013. REUTERS/Larry Downing

By Matt Spetalnick

WASHINGTON (Reuters) - From Saudi Arabia to Israel, traditional U.S. allies in the Middle East are beginning to ask: Is America turning its back on us?

President Barack Obama's diplomatic overtures to old foe Iran and his last-minute refusal to attack Syria have officials in Israel, the Gulf countries and Turkey wondering if Washington is deliberately neglecting them to avoid being dragged into a Middle East facing deeper sectarian strife and concerns that Tehran may be seeking a nuclear bomb.

Media reports that the U.S. National Security Agency may have spied on the leaders of Germany, Mexico and Brazil have upset those longtime allies too, adding to the impression in some quarters that Obama has his foreign priorities backward.

But it is in the Middle East where Obama's policy is under harsher scrutiny, especially from Saudi Arabia, which fears a warming of relations between the United States and Riyadh's regional rival Iran.

A senior Saudi prince warned this week that the kingdom could "shift away" from the United States, suggesting a major strategic change after decades of close military and economic cooperation.

Israeli officials say they worry Obama will not take a hard enough line in negotiations with Iran over its nuclear ambitions and might balk at a military attack on Iran just as he backed off from attacking Syrian President Bashar al-Assad in September.

"The United States did a lot of damage to their image by failing to attack Syria," said an Israeli diplomat in Jerusalem.

Allies' concerns about U.S. distaste for deep involvement in the Middle East are heightened by opinion polls showing Americans strongly opposed to intervention in the Syrian civil war. A Reuters/Ipsos survey from October 11 showed only 13 percent of Americans backed U.S. intervention in Syria.

'IT'S A MESS OUT THERE'

The White House denies insinuations from both friends and foes in the Middle East that it does not have the stomach to use force in the region and points to the overthrow of Libyan leader Muammar Gaddafi in 2011.

U.S. officials also caution against underestimating Obama's willingness to use a military option against Iran to prevent it from getting a nuclear weapon.

"It's not as if this is a president who has proven to be unwilling to act when he believed it was in our interest, but he's not going to act when he doesn't think it's in our interest," said Ben Rhodes, Obama's deputy national security adviser.

He said the United States would not begin to lift sanctions against Iran until Tehran shows real progress in nuclear talks.

Washington and its allies believe Iran is developing the ability to make a nuclear weapon, but Tehran says the program is for generating power and medical devices.

But Obama will resist pressure from Saudi Arabia to become more active in Syria where the rebels opposing Assad are coming increasingly under the sway of Islamist militants, some of whom are linked to al Qaeda.

Obama is extremely wary of open-ended U.S. military involvement in the Middle East. His caution is shaped in part by Iraq, Rhodes said.

"I think the Iraq war does bear on our thinking," Rhodes told the Reuters Washington Summit. He said Iraq's slide into sectarian and political chaos "proved the limitations of our influence."

"We had an occupying army of 150,000 people in the country and we weren't able to dictate events in that country over the following several years. So it's not as if that was an advertisement for the ability of military power to dictate outcomes in the Middle East," he said.

Obama's wariness is matched by congressional opposition as well as a war-weariness that most polls show has permeated the American public.

"The president is accurately reflecting a kind of fatigue with the Middle East," said Elliott Abrams, a foreign policy aide under Obama's Republican predecessor, George W. Bush, and a frequent critic of the Democratic president.

Obama, he said, had embraced the view that "it's a mess out there" and that it is best to limit military action largely to drone strikes in places like Pakistan, Yemen and Somalia.

SAUDIS SMARTING

Saudi Arabia is still smarting over what it says were promises by the United States that it would strike Assad - a close ally of Iran - for using chemical weapons against civilians.

"What we are doing seriously is to scare the Americans to make them wake up. They can't make promises to us and then not implement those promises. It's going to cost them," said a Saudi analyst close to the thinking of the kingdom's rulers.

U.S. officials see the recent Saudi threat to distance itself from Washington as mostly rhetoric. There has been no sign the Saudis want to scale back or close U.S. military installations, including a base used to launch drones against militants in neighboring Yemen.

Large strides in U.S. oil output helped by "fracking" technology make America less dependent on Saudi Arabia and other Gulf crude producers. But if Saudi Arabia decides to translate its anger over U.S. policy into action, it could make life more difficult for Washington.

Saudi Arabia could be less helpful in filling the gap in global oil supplies - and keeping prices under control - to make up for lower Iranian exports caused by Obama's drive for international sanctions.

Saudi Arabia could also supply more advanced weapons to radical Islamists fighting to overthrow Assad, giving them an advantage in firepower over moderate Western-backed rebels.

Apart from trying to smooth over relations with Saudi Arabia and Israel, the White House is struggling to head off complaints from Europe and Latin America that the NSA monitored leaders' communications.

Those complaints stem from media reports based on classified documents leaked by former NSA contractor Edward Snowden.

"It is a challenging situation," Rhodes said. "Country by country, we're just going to have to address diplomatically what the concerns are that arise."

Despite the anger of individual leaders like German Chancellor Angela Merkel who suspects her cell phone was bugged, governments recognize that even some allies spy on each other. So the diplomatic fallout from the surveillance scandals is unlikely to last long.

"At the moment, there is not real damage done to relations," said a senior EU diplomat, citing common interests with the United States in trade talks, Afghanistan and the Middle East.

More worrying is Obama's handling of the Middle East, as well as distraction at home from constant budget battles with Republicans, the diplomat said.

"U.S. foreign policy is in serious problems, not only because of the NSA. That Obama could not go to Asia because of domestic problems left a disastrous impression in some ASEAN countries where China is increasing its influence," he said, referring to Obama's cancellation of a trip to Southeast Asia this month because of the U.S. fiscal crisis.

Germany will send its top intelligence chiefs to Washington next week to seek answers from the White House on the Merkel phone-tapping reports.

(Additional reporting by Crispian Balmer in Jerusalem, Andreas Rinke in Berlin, William Maclean in Dubai; Editing by Peter Cooney)