NEW DELHI — Iran has released nine Indian mariners it had held after seizing a foreign tanker that it claimed was smuggling Iranian oil, the Indian Foreign Ministry said on Friday.

The tanker, the Riah, which is based in the United Arab Emirates but registered in Panama, was seized nearly two weeks ago in the Strait of Hormuz, the narrow waterway through which 20 percent of the world’s oil supply is shipped.

With a simmering conflict pitting Iran against the United States and its gulf allies, the Emirates and Saudi Arabia, the seizure was one of several recent incidents demonstrating how vulnerable that oil flow is to disruption. Iran has also impounded a British tanker, apparently in retaliation for Britain detaining an Iranian tanker at Gibraltar, leading to talk of a potential swap.

Raveesh Kumar, a spokesman for the Indian Ministry of External Affairs, said the Riah and its 12 Indian crew members were detained by the Iranian Coast Guard on July 13. “Nine crew members have been released, and they will be on their way to India soon,” he said.