Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

A U.S. Navy sailor who was among ten briefly taken into custody by Iranian authorities Tuesday was shown on state television apologizing for entering the country’s territory.

"It was a mistake that was our fault, and we apologize for our mistake," the sailor is shown saying on state television. It is unclear under what circumstances the apology was made.

U.S. Central Command said of the apology video, "the video appears to be authentic but we cannot speak to the conditions of the situation or what the crew was experiencing at the time."

Related: What Iran's 'Fast' Release of U.S. Sailors Tells Us

A U.S. military official said: "Clearly this staged video exhibits a sailor making an apology in an unknown context as an effort to defuse a tense situation and protect his crew."

In the video, the sailor is asked whether GPS showed they penetrated Iranian territorial water and he replied, "I believe so."

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Iranian and U.S. officials said a mechanical problem apparently caused the vessels to enter Iranian territory. They were headed to Bahrain.

The sailors, nine men and one woman, were held overnight on Iran’s Farsi Island and released Wednesday. They were taken into custody Tuesday when their two small U.S. navy riverine vessels drifted into Iranian waters during a training mission.

The sailors were "safely returned" after departing Iran's Farsi Island at 3:43 a.m. ET aboard the riverine vessels they had been operating when the incident occurred, according to the U.S. Navy.

Iran's Revolutionary Guards (IRGC) said in a statement Wednesday that the sailors had been released back into international waters following a U.S. apology and clarifications that any incursion was "a mistake."

U.S. officials said there was no government apology to Iran.

"I can say unequivocally, the U.S. government did not apologize to the government of Iran in any way during the course of this," a senior State Department official said Wednesday. "We did provide context, we did explain that this was basically a routine transmission that had not intended to end up anywhere on Farsi Island or in Iranian territorial waters."

The State Department official said Secretary of State John Kerry and Iranian Foreign Minister Javad Zarif spoke at least five times over the course of ten hours Tuesday and Wednesday after the sailors were detained.

"All indications (were) that our sailors were well taken care of," Kerry said in an address Wednesday.

Related: U.S. Sailors Detained by Iran Are Returned

Defense Secretary Ash Carter, speaking at Fort Campbell Wednesday, told Army soldiers that the sailors were safe and assured them "our highest commitment is to the safety of all of you."

"Wherever we may ask you to go, the country will never leave you behind," Carter said.

Iran reached a high-stakes nuclear agreement with the U.S. and other powers last year, in which Iran agreed to dramatically limit its nuclear program in exchange for relief from crippling sanctions.

Senior U.S. military commanders had criticized Iran last month for its "highly provocative" actions when it fired unguided rockets near U.S. ships, including the USS Harry S. Truman aircraft carrier.