(CNN) A top Iranian official said Wednesday that a foreign cargo ship had been seized in the Persian Gulf because it had a history of "peculiar" activity.

Iranian Foreign Minister Mohammad Javad Zarif, speaking at New York University, stressed that his country is committed to upholding the freedom of navigation even though it is still detaining the Marshall Islands-flagged Maersk Tigris vessel.

"For us, the Persian Gulf is our lifeline," Mohammad Javad Zarif said, "and nothing is more important for us than freedom of navigation in those waters."

Zarif said the ship had "some rather peculiar activity" in its past that resulted in court action, according to lawyers with whom his ministry has been in touch.

"Simply, our naval forces implemented the decision of the court," he added.

Rickmers Shipmanagement, the company managing the Maersk Tigris, a Maersk Line ship, said in a statement Thursday that the apparent issue dates back to 2005, when another Maersk Line vessel delivered a shipment to Dubai that was later disposed of when no one collected the containers.

A spokesperson for Rickmers Shipmanagement also said that 24 people are on board the Maersk Tigris and that they are all doing well. None is American.

A spokeswoman for the Iranian foreign ministry defended the seizing of the ship, saying it was in line with international law, according to report on the state-run Iranian agency Press TV.

Photos: Iran parades military equipment Photos: Iran parades military equipment Iranian air force jets -- a MiG-29, from left, an F-4 Phantom and an F-14 Tomcat -- escort a Boeing 747 as they perform a flyover during a parade marking National Army Day on Saturday, April 18. Hide Caption 1 of 9 Photos: Iran parades military equipment Iranian army troops wearing ghillie camouflage suits participate in the parade just outside Tehran, Iran. Hide Caption 2 of 9 Photos: Iran parades military equipment Iranian President Hassan Rouhani reviews the parade April 18. Hide Caption 3 of 9 Photos: Iran parades military equipment Mid-range Zelzal missiles are driven through the parade outside Tehran. Hide Caption 4 of 9 Photos: Iran parades military equipment Soldiers drive a military vehicle through the parade. Hide Caption 5 of 9 Photos: Iran parades military equipment A Zoobin missile is exhibited during the parade. Hide Caption 6 of 9 Photos: Iran parades military equipment A soldier sits atop a T-72 tank as it rolls past a portrait of Supreme Leader Ayatollah Ali Khamenei on April 18. Hide Caption 7 of 9 Photos: Iran parades military equipment Missiles are paraded past Rouhani and military leaders. Hide Caption 8 of 9 Photos: Iran parades military equipment Iranian sailors march in the parade. Hide Caption 9 of 9

But the Pentagon has pointed out that even though the Strait of Hormuz, where the seizure occurred, is in Iranian territorial waters, "innocent passage" is applied -- ships are authorized to pass through the body of water assuming they abide by all the rules of the sea -- because it is an internationally recognized shipping lane.

Zarif, meanwhile, insisted that Iran's decision to seize the ship was unrelated to the ongoing conflict in Yemen, which has created a tense dynamic in the Persian Gulf between Iran and its neighbors.

Last week the U.S. sent warships to waters near Yemen to observe and deter Iranian ships they feared were delivering weapons in support of Houthi rebels who have ousted the U.S.-backed government. The Iranian convoy turned back after the U.S. naval presence was bolstered.

At the same time, the U.S. and five other world powers are negotiating with Iran for a final deal to curb to Tehran's nuclear program. Zarif said those talks would continue Thursday in New York and Monday in Europe.

Zarif called the agreement taking shape between Iran and the six world powers known collectively as the P5+1 "a good agreement."

"It's not a perfect agreement," he acknowledged. "It's not perfect for us, it's not perfect for the United States, it's not perfect for our European Union partners."

"But," he said, "it's the best we can get. It's the best anybody can get, and it's balanced in my view."

Zarif made these comments while in the U.S. for a ministerial conference at the United Nations on nuclear proliferation issues. The foreign minister also met Monday with U.S. Secretary of State John Kerry on the sidelines of that conference to discuss the next steps in the nuclear negotiations.

"There will be meetings this week in New York at the expert level among the P5+1 members, the EU and Iran," a State Department official confirmed to CNN, "taking advantage of the presence of many of these experts in NY for the [Nuclear Proliferation Treaty] review conference."

"We don't have any other upcoming travel or meetings to announce today," the official added, "but you can expect that we will have a robust schedule of negotiations between now and June 30th."

The P5+1 and Iran reached a framework political understanding earlier this month in Lausanne, Switzerland, but significant obstacles remain in their efforts to reach a full agreement by the end of June.

In particular, the two sides have differing demands on the pace of sanctions relief and access for international nuclear inspectors.

Also at issue is whether sanctions against Iran can be quickly reinstated with a so-called "snapback" provision if Iran is found to be in violation of the deal's terms.

The final agreement will include this provision, Zarif said, but it's a measure that works both ways.

"We didn't do this in order to simply snap back," he said. "But we have a reciprocal procedure -- unfortunately because of the mutual lack of confidence that exists -- so that if each side believes that the other side is not living up to its commitment, it can, after completing certain procedures, revert back."

The provision, Zarif said, is beneficial for Iran because the U.S. has violated previous obligations to Iran under a provisional agreement by instituting new unilateral sanctions.

The U.S. has put new unilateral sanctions in place on Iranian officials since signing the provisional document. America, though, doesn't consider these a violation but rather enforcement of sanctions that are still in place.

"If people are worried about snapback, they should be worried about the U.S. violating is obligation, and us snapping back," he warned.

Zarif also weighed in on Iran's continued detainment of Washington Post reporter Jason Rezaian, who was recently charged with espionage and other security-related crimes.

"Unfortunately, your friend and my friend Jason is accused of a very serious offense," Zarif told moderator David Ignatius, who also works for the Washington Post. "I hope that he is cleared in a court."

"But he will have to face a court," Zarif added, noting that Rezaian is a dual Iranian-American citizen.

"It is unfortunate that some overzealous low-level operative tried to take advantage of him," Zarif said without elaborating because of the "pending court case."

"I still continue to hope that Jason will be able to clear his name before a court," he later added.