CAIRO — Iran reversed its decision to reopen the Strait of Hormuz and fired on a tanker attempting to pass the waterway on Saturday. It also warned that it would continue to block transit through the strait as long as the U.S. blockade of Iranian ports remained in effect.

Confusion over the critical choke point threatened to deepen the energy crisis roiling the global economy and push the two countries toward renewed conflict, even as mediators expressed confidence that a new deal was within reach.

Iran’s joint military command said “control of the Strait of Hormuz has returned to its previous state … under strict management and control of the armed forces.”

Two Islamic Revolutionary Guard Corps gunboats opened fire on a tanker, and an unknown projectile hit a container vessel, damaging some containers, the British military’s United Kingdom Maritime Trade Operations center said. It reported the tanker and crew as safe, without identifying the vessel or its destination.

TankerTrackers.com reported vessels were forced to turn around in the strait after they were fired upon by Iran, including two Indian-flagged ships. India’s foreign ministry said it summoned Iran’s ambassador over the “serious incident.”

Saturday’s developments came after President Trump said the blockade “will remain in full force” until Tehran reaches a deal with the U.S. that includes its nuclear program. Tehran had reopened the strait to commercial vessels on Friday.

Roughly one-fifth of the world’s oil passes through the strait, and further limits would squeeze already constrained supply, driving prices higher once again. Iran’s Friday announcement about the reopening came as a 10-day truce between Israel and the Iranian-backed Hezbollah militant group in Lebanon appeared to hold.

For Iran, the strait’s closure — imposed after the U.S. and Israel launched the war on Feb. 28 during talks over Tehran’s nuclear program — is perhaps its most powerful weapon, threatening the world economy and inflicting political pain on Trump. For the United States, the blockade keeps up pressure and could strangle Iran’s already weakened economy.

Iran’s new supreme leader, Ayatollah Mojtaba Khamenei, issued defiant remarks Saturday, saying the navy stands “ready to inflict bitter defeats on its enemies.” He has not been seen in public since being elevated to the post following his father’s death in Israel’s opening barrage.

A turnaround a day after Iran said the strait was open

On Friday, Iran announced the strait’s reopening to commercial vessels after a 10-day truce was announced between Israel and the Iranian-backed Hezbollah militant group in Lebanon. The reopening caused oil prices to fall.

Trump, however, said the blockade of Iran’s ports “will remain in full force” until Tehran reaches a deal with the United States. Trump had imposed the blockade after a round of historic face-to-face talks in Pakistan between the countries ended without an agreement.

U.S. forces have sent 23 ships back to Iran since the blockade began Monday, U.S. Central Command said Saturday. Trump’s comments triggered an outcry.

“Americans are risking the international community, risking the global economy through these, I can say, miscalculations,” Iranian Deputy Foreign Minister Saeed Khatibzadeh told the Associated Press, adding that the U.S. is “risking the whole ceasefire package.”

Iran’s Supreme National Security Council issued a statement calling the blockade a violation of the ceasefire and said Iran would prevent “any conditional and limited reopening” of the strait. The council recently has acted as Iran’s de facto top decision-making body.

Since most supplies to U.S. military bases in the gulf region come through the strait, “Iran is determined to maintain oversight and control over traffic through the strait until the war fully ends,” the council said. That means Iran-designated routes, payment of fees and issuance of transit certificates.

Pakistan pushes for progress toward a new deal

The renewed standoff over the strait came hours after Pakistani Foreign Minister Ishaq Dar said his country was working to “bridge” differences between the U.S. and Iran. Pakistan is expected to host a second round of negotiations early next week.

The Supreme National Security Council said “new proposals” from the U.S. had been put forward during a visit to Iran by Pakistan’s army chief and were being reviewed.

But Khatibzadeh said the Iranians were not ready for a new round of face-to-face talks because the Americans “have not abandoned their maximalist position.”

He also said Iran will not hand over its stock of 970 pounds of enriched uranium to the United States, calling the idea “a nonstarter.” Khatibzadeh did not address other proposals for the enriched uranium, saying only that “we are ready to address any concerns.”

Trump said Saturday that Iran “got a little cute” but that “very good” conversations were happening and more information would come by day’s end. “They can’t blackmail us,” he added.

On Friday, Trump said the U.S. would go into Iran and “get all the nuclear dust,” referring to the enriched uranium, which is believed to be buried under nuclear sites badly damaged by U.S. military strikes last year.

French peacekeeper is killed in Lebanon

French President Emmanuel Macron said a French soldier was killed and three others were wounded Saturday during an attack on United Nations peacekeepers in southern Lebanon. “Everything suggests that responsibility for this attack lies with Hezbollah,” Macron wrote on social media.

There was no immediate comment from Hezbollah.

The Israeli military also reported that one of its soldiers, an officer, was killed in South Lebanon on Friday. It said two other soldiers were injured in the incident but didn’t release more details.

Pakistan’s foreign minister said fighting between Israel and Hezbollah had been a key sticking point in U.S.-Iran talks, and the declaration of a ceasefire in Lebanon was seen as a boost to efforts for an Iran agreement.

It was unclear to what extent Hezbollah would abide by a truce it didn’t play a role in negotiating, especially with Israeli troops still occupying a stretch of southern Lebanon.

In Beirut, more displaced families began moving toward southern Lebanon and the capital’s southern suburbs despite warnings by officials not to return home until it was clear whether the ceasefire would hold.

The Iran war has killed at least 3,000 people in Iran, more than 2,290 in Lebanon, 23 in Israel and more than a dozen in gulf Arab states. Thirteen U.S. service members have been killed.

Metz reported from Ramallah, West Bank. Associated Press writers Munir Ahmed in Islamabad, Pakistan, and Suzan Frazer and Andrew Wilks in Antalya, Turkey, contributed to this report.