U.S. Secretary of State John Kerry thanked Iran Wednesday for quickly releasing 10 American sailors detained after their boats drifted into Iranian territorial waters Tuesday. 

"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," Kerry said in a statement. 

The U.S. military confirmed earlier Wednesday that the nine men and one woman briefly held by Iran were back in American care, and said there were no indications they were harmed. 

In a statement, the U.S. navy said the sailors departed the Iranian base where they were being held on Farsi Island at 0843 GMT (3:43 a.m. ET) Wednesday, on the same boats that brought them there.

It said the navy would conduct an investigation into the incident.

Mideast Iran U.S.

This picture released by the Iranian Revolutionary Guards on Wednesday shows detained U.S. sailors in an undisclosed location in Iran. The Revolutionary Guard said the sailors were released after it was determined that their entry into Iranian waters was not intentional. (Sepahnews/Associated Press)

The U.S. military has said that mechanical trouble with one of the boats caused them to drift into Iranian territory. 

U.S. Vice-President Joe Biden said Wednesday that America did not apologize to Iran about the incident. 

In an interview with CBS This Morning, Biden said, "There's nothing to apologize for. When you have a problem with the boat you apologize the boat had a problem? No, and there was no looking for any apology. This was just standard nautical practice."

Biden said that the Iranians realized the U.S. sailors "were there in distress and said they would release them and released them like ordinary nations would do."

Earlier Wednesday, Iran's Revolutionary Guard said the sailors were released after it was determined that their entry into Iranian waters was not intentional.

Nuclear deal a possible factor

This incident comes as a deal is about to be formally implemented under which the U.S. will free up about $100 billion US in Iranian assets in exchange for Iran's constraint of its nuclear program. That factor likely affected how quickly the sailors were released, CBC Middle East correspondent Derek Stoffel reported, citing an Iranian analyst.   

"That money is desperately needed to help revive the beleaguered Iranian economy," Stoffel said. "There is also a lot of pressure by a lot of Iranians on their leadership to have these sanctions eased ... There would be a lot of Iranian disappointment if something such as this naval incident were to have scuttled that."

With files from CBC News