DUBAI, United Arab Emirates -- Iranian forces fired warning shots across the bridge of a Marshall Islands-flagged cargo vessel as it was traversing the Strait of Hormuz, boarded the ship and directed it toward the Iranian mainland, a Pentagon official said Tuesday.

The incident with the MV Maersk Tigris, which prompted the U.S. Navy to dispatch a destroyer and a plane in response, comes at a critical time in Iran's relations with its neighbours and the United States.

The U.S., other world powers and Iran are trying to hammer out a final deal over Iran's nuclear program. Last week, the U.S. Navy dispatched an aircraft carrier and guided missile cruiser to the Arabian Sea amid worries that a convoy of Iranian cargo ships was headed to Yemen to deliver arms to the Shiite rebels fighting to take over Yemen.

And U.S. Navy officials said Tuesday that several Iranian Revolutionary Guard Navy vessels had surrounded a U.S.-flagged cargo ship, the Maersk Kensington, last Friday as it was transiting the Strait of Hormuz. No shots were fired, the Iranian vessels broke off contact, and the cargo ship proceeded without further incident.

In Tuesday's incident, the intercepted ship was travelling through the narrow Strait, which is technically Iranian and Omani territorial waters, but under international agreement is open to foreign ships making an innocent passage, said Col. Steve Warren, a Pentagon spokesman. It wasn't clear whether the ship had strayed off course into coastal waters not protected by that agreement.

The master of the cargo ship MV Maersk Tigris had initially refused an Iranian order to move further into Iranian waters, but after the warning shots were fired the vessel complied, Warren said.

The cargo ship was directed to waters near Larak Island, he said. The island sits off the major Iranian port of Bandar Abbas and is one of several in the Strait of Hormuz.

Iranian state television reported that only 24 crew were onboard the vessel, and hailed from Britain, Bulgaria, Romania and Myanmar. It said the ship was seized based on a court order due to unspecified violations. Iranian officials could not immediately be reached for comment.

Bandar Abbas is the main port for Iran's Navy and separate naval forces operated by the elite Revolutionary Guard, as well as the country's primary commercial port. It overlooks the Strait of Hormuz, the highly strategic waterway at the mouth of the Persian Gulf.

The strait is the route for about a fifth of the world's oil and is only about 33 kilometres (21 miles) wide at its narrowest point. Ships traversing the chokepoint have even less room to manoeuvr. The shipping lane in either direction is only two miles wide, with a two-mile buffer zone between them.

Iran has in the past threatened to block the strait, a move that could spark a military conflict in the Gulf. American and allied naval forces routinely patrol the strait and have conducted military drills aimed at countering threats such as sea mines that Iran might use to close the waterway.

Tehran frequently conducts military exercises of its own in and around the strait. Large-scale, live-fire naval drills in February saw Revolutionary Guard forces assault a replica of a U.S. aircraft carrier built in a Bandar Abbas shipyard.

"It is inappropriate" for the Iranians to have fired warning shots across the ship's bridge in Tuesday's circumstances, Warren said. He said it was too early to know whether the Iranian intervention amounted to a violation of the freedom of navigation through a waterway heavily used by international shipping.

Warren said the cargo ship had been boarded by Iranians, but no one was injured and no Americans were involved. The spokesman said the U.S. government has "certain obligations" to defend the interests of the Marshall Islands, but he was uncertain how those obligations to the Pacific Ocean nation apply in this situation.

The Iranian vessels, numbering five or six, were with the Iranian Revolutionary Guard Corps Navy, he said. The incident began at about 4:05 a.m. U.S. Eastern Daylight Time, he said.

After the cargo ship sent a distress call, the U.S. Navy sent the destroyer USS Farragut and a Navy maritime patrol and reconnaissance aircraft to the area of the incident to monitor the situation, according to Warren.

Lt. Joseph Hontz, a spokesman for the U.S. Navy's 5th Fleet in Bahrain, which oversees American maritime operations in the region, declined to comment further on the incident and referred queries to the Pentagon.

Maersk, based in Copenhagen, Denmark, said the ship was chartered to Rickmers Ship Management, based in Hamburg, Germany. Maersk said it had no information about the crew or the cargo. Sabina Pech, a Rickmers spokeswoman in Hamburg, said she was aware of the incident but had no information and could not comment.

In 2007, Revolutionary Guard forces captured 15 British sailors and marines from a frigate in the Gulf, accusing them of operating in Iranian waters. They were released less than two weeks later.

------

Burns reported from Washington. Associated Press writers Nasser Karimi in Tehran, Iran, Jan Olsen in Copenhagen, Denmark and David Rising in Berlin contributed to this report.