Nine U.S. sailors and a naval officer were detained overnight in January by Iran in an embarrassment to the Navy because of a breakdown in leadership and training that led to them drifting off course and into Iranian territorial waters, according to the results of a Navy investigation released Thursday.

The sailors were taken Jan. 12 at gunpoint and blindfolded by armed members of Iran’s Revolutionary Guard during a trip southeast from Kuwait to Bahrain. The Iranians stopped them after they motored in two 53-foot riverine command boats within about one nautical mile of the Persian Gulf’s Farsi Island, on which Iran has a major military installation. IThe U.S. sailors never realized what island they were nearing, despite having the mapping technology to know better, the investigation found.

“As the Fleet Commander I highlight up front that I do not assess a broader systematic deficiency in the warrior ethos and fighting spirit of the operating forces under my command,” said Vice Adm. Kevin M. Donegan, commander of U.S. Naval Forces Central Command, in the investigation’s report.

“As disappointing as the circumstances surrounding the incident on 12 January 2016 were, I find the failures that were documented in this investigation to be a symptom of a poorly led and unprepared unit thrust into a confusing situation that they were unable to comprehend and react to, until it was too late,” he concluded.

The investigation criticizes the Revolutionary Guard members who took the sailors, saying their actions were inconsistent with international law and aggressive. Videos released by Iranian media have depicted the sailors receiving humane treatment, but interviews carried out by the Navy found that while not harmed, the Americans were interrogated and the boats carrying them were ransacked.

The Iranians should have assisted the sailors, who were carrying out what mariners call innocent passage when one of their boats suffered an engine problem, investigating officers found. But a Navy lieutenant and an enlisted petty officer first class in charge of the boats and a detachment commander in Kuwait “were derelict in their duties in that they failed to meet even the most basic requirements of leadership, planning and tactical execution,” the investigation found.

Already, the Navy has removed the commander of the task force involved, Capt. Kyle Moses, and Cmdr. Eric Rasch, who was the No. 2 officer in the unit to which the sailors belong.

Moses was effectively fired last week as commander of Task Force 56, a unit whose missions include explosive ordnance disposal, diving, construction, riverine operations and military intelligence collection.

Rasch was elevated after the incident to lead the unit involved, Coastal Riverine Squadron 3 of San Diego, but removed from the position in May.

Adm. John Richardson, the chief of naval operations, told reporters at the Pentagon on Thursday that a third lower-ranking officer also was removed from his job. He was the detachment commander in Kuwait cited in the report, and has not been identified because he still faces non-judicial punishment, Navy officials said. Five other individuals — including three who were on the captured boats — also still face disciplinary action.

“The main point of the investigation is that you never want to get yourself into that position where you really have very, very few good choices,” Richardson said.

The course the boats were supposed to take cut southeast through the Persian Gulf at an established safe distance north of Farsi Island before cutting nearly straight south for a refueling at sea and proceeding on to Bahrain. The sailors deviated from that path by traveling just south of Farsi Island instead in part because they were running behind schedule and wanted to make sure they got to the refueling ship before dark.

The investigation also explored the ethical dilemmas the sailors faced. Under existing rules of engagement, unit commanders retain both a right and obligation to defend themselves when facing a potential enemy. Deployed U.S. troops also must adhere to a code of conduct that says they will never surrender of their own free will, and will resist by all means necessary if taken captive.

An enlisted coxswain in one of the craft, riverine command boat (RCB) 802, refused directions to maneuver away from the Iranian boats for fear someone would be shot, forcing the lieutenant on board to try to talk his way out of the altercation. The other craft, RCB 805, went back to the Navy boat that stopped afterward.

Once in captivity, one crew member failed to uphold the code of conduct by making “statements adverse to U.S. interests” during an interrogation, the report said. Among the details disclosed were specifics about the boat’s top speed.

Another detained American failed to uphold the code of conduct by encouraging others to eat food provided by the Iranians, despite knowing that they were being recorded on video. Those clips were later distributed by Iranian state media.

The investigation does highlight quick thinking on the part of one sailor, however. The sole female crew member, a gunner on RCB 805, deserves “proper recognition for her extraordinary courage in activating an emergency beacon while kneeling, bound and guarded at Iranian gunpoint, at risk to her own safety,” the investigating officer found. The Iranians quickly disabled it, but did not harm her.

The investigating officer also credited the crews of the USS Anzio, a cruiser, and the USCGC Monomoy, a Coast Guard vessel, for their efforts to find the missing sailors.