By Babak Dehghanpisheh and Sylvia Westall
GENEVA/DUBAI (Reuters) - U.S. President Donald Trump said he was prepared to take military action to stop Tehran from getting a nuclear bomb but left open whether he would back the use of force to protect Gulf oil supplies that Washington fears may be under threat by Iran.
Worries about a confrontation between Iran and the United States have mounted since attacks last week on two oil tankers near the strategic Strait of Hormuz shipping lane at the entrance to the Gulf. Washington blamed long-time foe Iran for the incidents.
Tehran denies responsibility but the attacks, and similar ones in May, have further soured relations that have plummeted since Trump pulled the United States out of a landmark international nuclear deal with Iran in May 2018.
Trump has restored and extended U.S. economic sanctions on Iran. That has forced countries around the world to boycott Iranian oil or face sanctions of their own.
But in an interview with Time magazine, Trump, striking a different tone from some Republican lawmakers who have urged a military approach to Iran, said last week's tanker attacks in the Gulf of Oman had only a "very minor" impact so far.
Asked if he would consider military action to prevent Iran from obtaining nuclear weapons or to ensure the free flow of oil through the Gulf, Trump said: "I would certainly go over nuclear weapons and I would keep the other a question mark."
The nuclear deal with Iran, which was reached in 2015 during Barack Obama's presidency, aimed to head off any pathway to an Iranian nuclear bomb. Trump says the agreement failed to address Iran's missile programme or punish it for waging proxy wars in Middle East countries.
Tehran has decried the toughening of U.S. sanctions and urged other signatories to take action to save the nuclear pact or see Iran turn its back on the deal.
The United States will maintain its pressure campaign on Iran and continue to deter aggression in the region but does not want the conflict with Tehran to escalate, Secretary of State Mike Pompeo said on Tuesday.
"We have been engaged in many messages, even this moment right here, communicating to Iran that we are there to deter aggression," Pompeo told reporters. "President Trump does not want war and we will continue to communicate that message while doing the things that are necessary to protect American interests in the region."
As tension with Iran rises, uncertainty about leadership of the Pentagon grew on Tuesday with the news that acting Defense Secretary Patrick Shanahan had withdrawn from consideration to head the U.S. military. USA Today has reported the FBI had been examining a 9-year-old domestic dispute involving Shanahan and his then-wife.
CALLS FOR RESTRAINT
Shanahan on Monday had announced the deployment of about 1,000 more troops to the Middle East for what he said were defensive purposes, citing concerns about a threat from Iran.
The deployment is in addition to a 1,500-troop increase announced last month in response to tanker attacks in May.
Russia told the United States it should drop what it called provocative plans to deploy more troops to the Middle East and cease actions that looked like a conscious attempt to provoke war with Iran, and urged restraint on all sides.
"What we see are unending and sustained U.S. attempts to crank up political, psychological, economic and yes military pressure on Iran in quite a provocative way," Deputy Foreign Minister Sergei Ryabkov was cited as saying by Russian media.
"They (these actions) cannot be assessed as anything but a conscious course to provoke war," he said.
China's top diplomat, Wang Yi, warned the world should not open a "Pandora's box" in the Middle East, as he denounced U.S. pressure on Iran and urged Tehran to heed the deal.
Chancellor Angela Merkel said Germany, another signatory, was doing all it could to ease tensions with Iran but said Iran must abide by the 2015 deal.
Iranian President Hassan Rouhani said in a speech that Iran did not seek war and dismissed U.S. efforts to isolate Iran.
"Iran will not wage war against any nation," he said. "Despite all of the Americans' efforts in the region and their desire to cut off our ties with all of the world and their desire to keep Iran secluded, they have been unsuccessful."
But the commander of Iran's elite Revolutionary Guards Corps said on Tuesday that Iran's ballistic missiles were capable of hitting "carriers in the sea" with great precision.
"These missiles are domestically produced and are difficult to intercept and hit with other missiles," Brigadier General Hossein Salami said in a televised speech. He said Iran's ballistic missile technology had changed the balance of power in the Middle East.
Heightened Iran-U.S. tensions have stoked fears of increased violence in countries where Iran and its Gulf Arab regional rivals are locked in a sometimes bloody struggle for influence.
Saudi air defences intercepted two drones fired by Yemen's Iran-aligned Houthi group, Saudi media said on Tuesday. The group's Al Masirah TV said the Houthis had sent drones to strike the airport of the Saudi city of Abha.
Three rockets landed on a military base hosting U.S. forces north of Baghdad late on Monday, an Iraqi military statement said, without providing further details. There was no immediate claim of responsibility for the attack.
U.S. officials said last month there was an increased threat from Iran-backed militias against U.S. interests in Iraq, and the U.S. Embassy in Baghdad evacuated hundreds of staff.