A former naval officer said the Navy has a black eye after Iran took 10 U.S. sailors into custody, and a video surfaced in which one sailor apologized to Iran for entering Iranian waters.

Chris Harmer, who now is an analyst with the Institute for the Study of War, said officials must get to the bottom of how so many things went wrong now that all 10 sailors are safely back in U.S. custody.

"The substance of [the] problem here is the U.S. Navy looks extraordinarily incompetent," Harmer said. "In its ability to transit boats without violating Iranian waters, they look incompetent to know how to deal with a mechanical malfunction, and now that they've been taken into custody, they're apologizing."

A video surfaced on Wednesday that showed a sailor apologizing on camera to Iranian questioners.

"It was a mistake that was our fault and we apologize for our mistake," the sailor said.

Harmer said this broke the U.S. military's code of conduct, which instructs service members taken captive to give their name, rank, service number, date of birth and nothing else. Harmer said many will see this apology by a service member in uniform as an apology on behalf of the U.S. Navy.

"He is not authorized and he should not be apologizing for anything he does while on active duty," Harmer said. "If he did something wrong, someone in his chain of command will issue an apology."

Ten sailors were held by Iran overnight on Tuesday after two small patrol boats strayed into Iranian waters. Harmer stressed that neither side did anything illegal, and that Iran had a right under internationally recognized laws of the sea to detain sailors who entered their sovereign waters.

Harmer, who served 20 years in the Navy and was the deputy director for future operations at the Navy headquarters in Bahrain, said the sailors were required to have a navigation plan approved by a someone in their chain of command at 5th Fleet. Entering Iranian waters means someone either approved a navigation plan that brought the boats too close to Farsi Island or that the sailors violated their own plan.

"The American public deserves to know why the United States Navy can not operate professionally in the Persian Gulf," Harmer said. "You're not fighting anybody, you're not towing anything, you're not doing a mission, you're just moving from point A to point B."

Some reports have suggested that the boats may have suffered a mechanical failure, but Harmer said the sailors should have tossed a tow line from a working boat to the disabled boat to direct both vessels to friendly Saudi Arabian waters.

Vessels are allowed to enter sovereign waters under the law of innocent passage, but only in special circumstances, like when two international bodies of water are connected by a narrow strip of territorial waters or when conducting a search-and-rescue mission.

The two U.S. patrol boats did not meet any of these criteria and had no right to be in Iranian waters, Harmer said.