WASHINGTON –  Amid Israeli threats to bomb the Iranian nuclear facilities, President Barack Obama said Sunday that the United States wants a diplomatic solution to overcome concerns over Islamic republic's atomic programme.

"Any kind of additional military activity inside the Gulf is disruptive and has a big effect on us. It could have a big effect on oil prices. We've still got troops in Afghanistan, which borders Iran. And so our preferred solution here is diplomatic," he said in a television interview.

At the same time, he said he does not think Israel has decided whether to attack Iran, as the Jewish state's grim threats has the Middle East on edge.

The president sought to assure allies and foes alike that the United States was working in lockstep with Israel to solve the crisis, "hopefully diplomatically."

Obama also said he did not believe Iran had the "intentions or capabilities" to attack the United States, playing down the counter-threats from Tehran.

Iran says its nuclear programme is meant to produce energy, not weapons.

The president's comments echoed concerns expressed by earlier by Iran's neighbour Turkey that an attack on Iran would be disastrous.

Obama, who is up for re-election in November, has ended the U.S. war in Iraq and is winding down combat in Afghanistan amid growing public discontent about American war spending at a time when the economy remains shaky.

"My number one priority continues to be the security of the United States, but also the security of Israel, and we are going to make sure that we work in lockstep as we proceed to try to solve this, hopefully diplomatically," he told NBC.

Speaking at a security conference in Munich, Turkish Foreign Minister Ahmet Davutoglu said an attack would be a disaster and suggested the dispute over Iran's nuclear program could be ended very rapidly.

"If there is strong political will and mutual confidence being established, this issue could be resolved in a few days," he said. "The technical disputes are not so big. The problem is mutual confidence and strong political will."

He added: "A military option will create a disaster in our region. So before that disaster, everybody must be serious in negotiations. We hope soon both sides will meet again but this time there will be a complete result."

Qatari Deputy Foreign Minister Khalid Mohamed al-Attiyah said an attack "is not a solution."

"I believe that with our allies and friends in the West we should open a serious dialogue with the Iranians to get out of this dilemma. This is what we feel in our region," he said.

Turkey hosted talks between Western powers and Iran a year ago that ended in stalemate because the participants could not agree on an agenda.

Despite Obama's stated preference for a diplomatic solution, he said from the White House on Sunday he would not take options off the table to stop Iran from getting nuclear weapons.

"We're going to do everything we can to prevent Iran from getting a nuclear weapon and creating an arms race - a nuclear arms race - in a volatile region," he said in the interview.