All 10 US Navy sailors have been released hours after they were detained by Iran, state media reported on Wednesday.

The sailors aboard two small patrol boats were taken into custody after they "inadvertently" strayed into Iranian waters.

Iran's Revolutionary Guard said the sailors were released on Wednesday after it was determined that their entry was not intentional.

The nine men and one woman were being held at an Iranian base on Farsi Island in the Persian Gulf after being detained nearby on Tuesday.

The US Navy's Bahrain-based 5th Fleet had no immediate comment or confirmation of the release.

Ahead of the release, an Iranian navy commander said that the authorities were satisfied that the US boats taken into custody were in Iranian territory unintentionally.

"Our final finding was that it has not been a hostile crossover meant for espionage or the like," General Ali Fadavi, revolutionary guards navy commander, said.

The foreign ministers of both countries, John Kerry and Mohammad Javad Zarif, had been in constant contact, Iranian media said.

Iran and the US had no diplomatic relations for more than three decades years but tensions have eased after a deal over Iran's nuclear ambitions was inked in July.

Formal implementation of the accord could begin in days, following steps Iran agreed to take to curb its nuclear activities.

Courtesy Aljazeera