Ten US Navy sailors held in Iran on January 12 for entering its territorial waters have been released on January 13.
The US expressed its gratitude to Iran for swiftly resolving the issue.
The sailors were detained on January 12 when one of their two vessels broke down while training in the Gulf.
It comes at a sensitive time, amid reports that a deal on Iran’s nuclear activities is just days away from implementation.
Iranian state media said the sailors were released into international waters after they apologized. However, White House officials said the US administration had not issued an apology to Iran.
The incursion was “unintentional”, a statement from the Iranian Revolutionary Guards quoted by state media said.
Earlier, the naval commander of the Guards, General Ali Fadavi, said investigations found a navigational failure was to blame.
“We have concluded that passage of Americans in our territorial waters was not a hostile passage or for espionage or similar acts,” he told Iranian television.
The US is investigating how the sailors entered Iranian waters.
Secretary of State John Kerry said he wanted to “express my gratitude to Iranian authorities for their co-operation in swiftly resolving this matter”.
“That this issue was resolved peacefully and efficiently is a testament to the critical role diplomacy plays in keeping our country safe, secure, and strong,” John Kerry said in a statement.
John Kerry called Foreign Minister Mohammad Javad Zarif shortly after the incident. The pair developed a personal rapport during the nuclear talks.
Those detained – nine men and one woman – were taken to Farsi Island, in the middle of the Gulf, where Iran has a naval base.
Pictures published on the Revolutionary Guards’ website showed the group sitting on a Persian rug, with the one female member wearing a headscarf.
Conservatives in both countries have opposed the nuclear deal, under which Iran will limit its nuclear activities in exchange for the lifting of sanctions.
In the US, Republican presidential candidates were among those expressing outrage at the sailors’ detention.
Iran’s deputy nuclear chief has meanwhile denied a report the Arak heavy-water reactor had been decommissioned, which would be a final step towards implementation of the nuclear deal.