An incident that sparked a momentary standoff between the U.S. and Iran has been settled after Iran's Revolutionary Guard released all 10 of the U.S. Navy sailors who, along with their ships, had been detained after they drifted into Iranian territorial waters due to mechanical issues.

The Pentagon confirmed their release Wednesday and the Navy corroborated the account, releasing a statement saying that the sailors departed the Iranian base on Farsi Island at about 4 a.m. EST aboard the boats they were detained with. The nine men and one woman were then picked up by Navy aircraft, while other sailors took control of their boats for their journey to Bahrain, where the U.S. 5th Fleet is based. 

"The Navy will investigate the circumstances that led to the sailors' presence in Iran," the statement said, noting that there aren't any indications that any of them were harmed while in custody.

Tuesday's incident occurred as the boats were moving between Kuwait and Bahrain, when the Pentagon momentarily lost contract with the crew. Officials blamed the incident on a mechanical problem present on at least one of the boats, according to Fox News.

Iran also determined the incident was sparked by a mechanical error.

"After determining that their entry into Iran's territorial waters was not intentional and their apology, the detained American sailors were released in international waters of the Persian Gulf," a statement posted online by Iran's Revolutionary Guard said Wednesday, according to the Associated Press.

Despite that, Iran still believes the U.S. isn't entirely without guilt.

"Certainly U.S. presence in Persian Gulf and their passage has never been innocent and we do not deem their passage as innocent," Gen. Ali Fadavi said, adding that Iran Foreign Minister Javad Zarif "had a firm stance (during a telephone conversation with U.S. Secretary of State John Kerry) on their presence in our territorial waters and said they should not have come and should apologize."

The incident came amid heightened tensions with Iran and mere hours before President Barack Obama gave his final State of the Union address to Congress and the public. While he didn't mention the sailors in his speech, word of their detainment was a hot topic in Washington, with many officials sounding off about it.

Sen. Ben Cardin (D-Md.), ranking member on the Senate Foreign Relations Committee, expressed hope for a quick solution, saying, "It's a very serious issue. I hope this is resolved in hours. If not, I think it escalates." 

GOP presidential candidate Ted Cruz used the incident to take a swipe at Obama, saying it was a "manifestation of the weakness of Obama's foreign policy," adding, "our enemies don't fear us."

The incident comes on the heels of an incident in late December when Iran launched a rocket test near U.S. warships passing through the Strait of Hormuz. While U.S. officials said that Iran had no apparent ill-intent, they still say that it was an unnecessary and careless act.

In the meantime, Iran has expected to satisfy the terms of last summer's nuclear deal in a few days. Once complete, the U.S. and other Western powers will suspend all sanctions on Tehran.