DUBAI, United Arab Emirates — President Trump said Thursday he had called off new military strikes on Iran, claiming a breakthrough in negotiations to end the war just hours after the American leader threatened to escalate the conflict by seizing control of Iran’s oil industry.

Trump has said multiple times in recent weeks that the warring parties have been on the cusp of a deal without anything coming to fruition. There was no immediate comment from officials in Iran, which the U.S. and Israel jointly attacked on Feb. 28, or from mediators taking part in negotiations.

Trump opened an Oval Office event Thursday afternoon saying: “We just made a great settlement of the war with Iran.” He offered scant details, other than to say he expects an agreement to extend the ceasefire to be finalized “over the next few days.”

Extending the terms of the ceasefire gives U.S. leaders more time to negotiate over Iran’s nuclear program, the main reason Trump and Israeli Prime Minister Benjamin Netanyahu used to justify launching the war.

The announcement came after two days of back-and-forth attacks between the U.S. and Iran had pushed the Middle East closer to the resumption of a full-scale war.

Trump had threatened further escalation earlier Thursday, posting on social media that the U.S. would hit Iran “VERY HARD TONIGHT” and take “total control” of its oil and gas industries.

A few hours later, Trump posted on social media that significant points in the negotiations “have been brought to the highest level of Iranian leadership and approved.” He also wrote that “discussions and final points have been, in both concept and great detail,” approved by United States, Israel and other regional allies.

A major sticking point in negotiations has been Iran’s nuclear program, which the U.S. and Israel fear could lead to an atomic weapon but which Tehran says is for peaceful purposes. Another key issue is Iran’s stranglehold on the Strait of Hormuz, a critical shipping lane for transporting oil and natural gas.

From threats to negotiating

Trump’s rapid shift Thursday from dire threats to promoting peace negotiations again underscored his whipsaw approach to the war. He suggested on Monday that a deal to end the conflict could be reached in a matter of days.

Then back-and-forth strikes rattled the Middle East this week. The first involved attacks between Iran and Israel, followed by the two rounds of fire between the U.S. and Iran, which targeted countries where U.S. troops are based. The U.S. strikes began after Trump blamed Iran for downing an American attack helicopter near the Strait of Hormuz. Both pilots were rescued safely.

Iran’s Foreign Ministry said the U.S. attacks had “effectively rendered the ceasefire … meaningless,” without saying it was abandoning it.

After Trump threatened more attacks were to come on Thursday, Iran’s parliamentary speaker, Mohammad Bagher Qalibaf, responded on social media that “wrong strategies and impulsive decisions” would wreak havoc on energy markets and “create an endless quagmire that you will be stuck in for years.”

It wasn’t the first time Trump threatened escalation before giving negotiations another chance. In April, he warned Iran that “a whole civilization will die tonight, never to be brought back again” if it didn’t agree to his terms, before extending a ceasefire.

Trump eyes Iran’s main oil terminal

Iran’s months-long stranglehold on the Strait of Hormuz has disrupted global energy supplies, driven up fuel prices and made food and other basics more expensive well beyond the region.

Trump had threatened Thursday to seize Kharg Island, the heart of Iran’s oil industry, through which 90% of its exports pass. Located on the other side of the Persian Gulf from U.S. bases in Kuwait and Saudi Arabia, the island is important because Iran’s coastline is mostly too shallow for tanker ships to dock.

It was unclear how serious Trump was about his threat to seize it.

“My preference has always been to take Kharg Island,” Trump said in an interview Thursday on Fox News. “I don’t know that America has the stomach for it, to be honest.”

American troops would be vulnerable on Kharg Island due to its proximity — about 21 miles — to the Iranian mainland, from which missiles, drones and artillery could be fired.

Trump indicated in the interview that he remains averse to sending U.S. forces into Iran.

“I don’t want to have boots on the ground,” Trump said. “But if I wanted to, we could put a small group of soldiers and take over the place.”

Trump compared his threat to take over Iran’s oil industry to how the U.S. assumed control of Venezuela’s oil sector after capturing then-president Nicolás Maduro in January.

Iran says U.S. attacks have made pact ‘meaningless’

Back-and-forth strikes rattled the Middle East for the third time this week. The first involved attacks between Iran and Israel, followed by the two rounds of fire between the U.S. and Iran, which targeted countries where U.S. troops are based.

The U.S. military’s Central Command said airstrikes ending early Thursday targeted Iran’s military surveillance, communications and air defense sites.

Explosions echoed around Iran’s capital, as well as the port city of Bandar Abbas and other southern areas along the Strait of Hormuz. Iran’s paramilitary Revolutionary Guard said sites hit included a manufacturing complex, a military barracks and a local Guard base outside Tehran.

Tehran said it fired back at Kuwait, Bahrain and Jordan.

Kuwait closed its airspace for several hours but did not report any damage. Jordan said it intercepted 20 Iranian missiles fired toward a base hosting U.S. troops, though no one was hurt.

Bahrain’s Interior Ministry said an 11-year-old girl was hurt and cars and homes were damaged by debris from intercepted Iranian strikes.

Iran’s Foreign Ministry said the U.S. attacks had “effectively rendered the ceasefire … meaningless,” without saying it was abandoning it.

Tensions persist over Iran’s nuclear program, Strait of Hormuz

Treasury Secretary Scott Bessent said in a social media post that the U.S. would extract funds from frozen Iranian accounts to offset the costs of damage to American allies and any tolls Iran imposes for ships to transit the Strait of Hormuz.

Beyond the deadlock over the strait, the two sides also remain at odds over Iran’s nuclear program. Tehran insists its nuclear efforts are peaceful. The U.S. and Israel fear Tehran’s stockpile of highly enriched uranium could be used to build an atomic weapon.

Iran has insisted that any deal to end the war must also end fighting in Lebanon between its ally militia Hezbollah and Israel. But Israeli Prime Minister Benjamin Netanyahu appears intent on pursuing his goal of destroying the militant group.

U.S. fires on another merchant ship to enforce blockade

The U.S. military’s Central Command said Thursday that it struck a Guinea-Bissau-flagged tanker attempting to evade the American blockade on Iranian ports. It said the M/T Jalveer was transporting Iranian oil when it was disabled late Wednesday after its crew failed to obey U.S. orders.

It’s the ninth merchant vessel the U.S. military says it disabled to enforce the blockade.

Three Indian sailors were killed when American forces struck the Palau-flagged M/T Settebello on Tuesday, said India’s minister overseeing ports and shipping Thursday on X.

Gambrell and Madhani write for the Associated Press. Madhani reported from Washington. AP writers Will Weissert, Collin Binkley, Michelle L. Price and Konstantin Toropin in Washington; Sheikh Saaliq in New Delhi; Munir Ahmed in Islamabad; Victoria Eastwood in Cairo; and Russ Bynum in Savannah, Ga., contributed to this report.