The incident had threatened to jeopardise diplomatic relations between the countries, just before the expected implementation of a landmark nuclear deal.
The sailors were detained after entering Iranian territory while en route from Kuwait to Bahrain.
Rear Admiral Ali Fadavi, from Iran's Islamic Revolutionary Guards Corps, says Iran now accepts the incursion was unintentional.
"Our final finding was that it has not been a hostile crossover meant for espionage or the like. They reached the area due to a malfunction of their navigation systems, acknowledging that they did not know they were close to the Iranian territory of Farsi Island, acknowledging the matter as being inadvertent and unintentional due to a breakdown of their systems."
Iran's acceptance of the incident as accidental marks a rapid de-escalation of tensions, just days out from the implementation of a nuclear deal.
Earlier, the Guards had said the boats were "snooping" in Iranian territory and had demanded an apology from Washington.
US Vice President Joe Biden has rejected reports that the US government offered Iran an official apology over the incident, saying there was nothing to apologise for.
However, a man identified as the US commander of the ship did apologise on Iranian television.
"It was a mistake that was our fault and we apologise for our mistake. It was a misunderstanding. We did not mean to go into Iranian territorial waters."
In a carefully worded statement, the US has avoided explaining how the two command boats came to be in Iranian wars.
US Secretary of State John Kerry has welcomed the release of the sailors, hailing it as an indication of improved relations between the countries.
"I also want to thank the Iranian authorities for their cooperation and quick response. These are always situations which, as everybody here knows, have an ability if not properly guided to get out of control. And I'm appreciative for the quick and appropriate response of the Iranian authorities. I think we can all imagine how a similar situation might have played out three or four years ago."
Similar episodes in the past, like the detention of British marines in 2007, developed into prolonged standoffs, deepening divisions between Iran and the West.
US House Minority Leader Nancy Pelosi attributes the peaceful resolution of this incident to stronger ties forged during negotiations over the nuclear deal between Iran and Western powers.
"The situation was resolved and the soldiers are safely returned. And I think that, frankly, I think that the diplomacy that was established during the negotiation of the accord helped facilitate that speedy, I think it's really even speedy, resolution of the situation."
Share
