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.