The Strait of Hormuz, the slender waterway that connects the Persian Gulf to the rest of the world and is a critical conduit in the global oil supply chain, has again become a point of contention for Iran and the United States — just as they are trying to reach a nuclear accord.

Responding to Iran’s seizure at gunpoint of a cargo ship that was traversing the strait this week, the United States Navy on Thursday began deploying about a dozen warships there to protect American vessels from possible seizure or harassment. The seized vessel was owned by the Danish company Maersk and registered in the Marshall Islands.

The American decision was seen as a signal to Iran, which historically has regarded the strait, an international waterway, as part of its sphere of influence. Iranian and United States forces battled in the strait 27 years ago. More recently, Iranian gunboats operated by the Revolutionary Guard have harassed foreign shipping in the strait in the name of national security. Iran’s military has also used the area as a backdrop for propaganda.

What is different this time is that both Iran and the United States are engaged in the final weeks of multilateral talks on an agreement that could resolve the longstanding dispute over Iranian nuclear activities. The deadline for reaching that agreement is June 30.