The Islamic Revolution Guards Corps (IRGC) said in a statement that ten US Navy sailors had been released after an apology from Washington over "unintentional" violation of Iranian territorial waters, Tasnim reported.
The IRGC added that the United States pledged to prevent such incidents.
The US marines were taken to international waters and freed, according to Iranian state broadcaster IRIB said.
Pentagon said Wednesday that the United States would investigate the incident.
Earlier it was reported that Iran had seized two US vessels, which were en route to Bahrain, holding the sailors on board captive.
On Tuesday, a US Department of Defense official told Sputnik that Tehran assured Washington the two US naval vessels would be permitted to continue their trip to Bahrain once they were released.
Iranian media reported on Wednesday that Iranian Foreign Minister Mohammad Javad Zarif had discussed the issue with his US counterpart John Kerry and demanded an apology for the "violation" of Tehran’s sovereignty.