Iran has released 10 American sailors held for entering its territorial waters, in an incident that tested newly improved United States-Iranian ties.
The US expressed its gratitude to Iran for swiftly resolving the issue.
The sailors were detained 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.
The process to begin lifting sanctions imposed on Iran due to its nuclear activities is expected to get under way at the end of this week.
Iranian state media say the sailors were released into international waters after they apologised. But White House officials said the US administration had not issued an apology to Iran.
The naval commander of Iran's Revolutionary Guards, General Ali Fadavi, said he was satisfied a mechanical failure was behind the incursion.
US 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," Mr Kerry said in a statement.
Mr 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.