Iranian flag
An Iranian flag flutters in front of the United Nations headquarters, during an International Atomic Energy Agency (IAEA) board of governors meeting, in Vienna, March 4, 2015. REUTERS/HEINZ-PETER BADER

(Reuters) - Iran has released a Marshall-Islands flagged container ship and its crew which were seized last month in one of the world's major oil shipping lanes, the Students News Agency ISNA quoted a foreign ministry official as saying on Thursday.

The vessel was diverted on April 28 by Iranian patrol boats in the Strait of Hormuz, prompting the United States to send vessels to monitor the situation and to accompany U.S.-flagged vessels passing through the strait.

"The Maersk container ship was released and it has left Iranian territorial waters," Foreign Ministry spokeswoman Marzieh Afkham told ISNA.

The Maersk incident coincided with heightened tension between regional arch-rivals Iran and Saudi Arabia over the civil war in Yemen, in which they support opposing sides.

Iran's state news agency IRNA, citing an informed source, said the Iranian Ports and Shipping Organization would issue a statement in a few hours on the details of the release of the Maersk Tigris.

Danish shipping giant Maersk had insisted on the release of the vessel and its 24 crew members.

Maersk, the world's largest container shipping company, chartered the ship, which according to ship operator Rickmers Shipmanagement is owned by undisclosed private investors.

A spokesman with Rickmers Shipmanagement said on Thursday: "We have noted same reports but have no official word on the ship’s release."

The IRNA report did not give details on whether a years-old debt case had been settled, as demanded by Iran for the release of the ship.

Afkham said on Wednesday that the negotiations between "the private complainant and the other party were going on".

The U.S. Navy had quietly stopped accompanying commercial ships on Tuesday, Pentagon spokesman Colonel Steve Warren said, noting that the original order to carry out the mission had only been for a brief period, which had ended.

U.S. Navy ships started accompanying U.S.-flagged commercial vessels through the Strait on April 30, a decision taken following the Maersk Tigris' seizure and after Iranian ships shadowed the U.S.-flagged Maersk Kensington on April 24.