Updated

Iran and an American-led naval coalition each said Thursday they responded to a distress call by a U.S.-flagged cargo ship that came under fire from gunmen in the Gulf of Oman a day earlier.

Armed guards aboard the 488-foot Maersk Texas thwarted the attack northeast of the Emirati port of Fujairah, Danish shipper A.P. Moller-Maersk said. The attack happened not far from the tense waters of the Strait of Hormuz, a key transit point for a fifth of the world's oil.

The Copenhagen-headquartered company said armed attackers in "multiple pirate skiffs" raced straight toward the ship around noon Wednesday despite clear warning signals from the Texas. Guards on board fired warning shots, but the suspected pirates opened fire, prompting ship guards to shoot back at them, according to the shipping line.

No one on the Texas was injured in the incident, and the ship continued on its voyage to the U.S., Maersk said.

Iranian news agencies reported that the suspected pirates fled when Iran's navy intervened after responding to an emergency call from the American ship.

Lt. Cdr. Mark Hankey, a spokesman for the Bahrain-based Combined Maritime Forces, was unable to confirm Iran's role in the incident. He also cast doubt on whether the event was an act of piracy at all.

"The full facts of the event have yet to be fully ascertained. Piracy has to be judged according to a number of factors. It is not clear from the information available to date whether this was a piracy event," Hankey said.

Somali pirates have been increasing their range, but attacks near the Strait of Hormuz remain relatively rare.

Hankey declined to say who the attackers might have been if not pirates, though he noted that fishermen and smugglers frequent the area. He did not suggest that the Iranian military, which operates a fleet of small, fast attack craft, might be involved.

The Combined Maritime Forces is a naval partnership including more than two dozen nations that operates in and around the Middle East. It is commanded by a U.S. Navy admiral.

An Australian ship assigned to the multinational force, the HMAS Melbourne, picked up a distress call from the American ship, Hankey said. It dispatched a helicopter to monitor the situation and set a course to assist.

Iran's official IRNA news agency and semiofficial Mehr news service reported that the Islamic Republic's navy helped thwart the attack. IRNA said an Iranian naval vessel picked up a distress call from the ship, and because of the navy's "vigilance and timely reaction ... the pirates fled the scene."

While he was not aware of Iranian aid to the Texas, Hankey said such assistance would not necessarily be out of the ordinary.

"If you hear of a vessel in distress, you do your best to assist" on the high seas, he said. "If the Iranians responded to a mayday call, then that's perfectly normal activity. ... That's what this whole mayday call is about."

American ships have occasionally come to the aid of Iranian merchant vessels in similar circumstances.