Nine Navy personnel are facing discipline after a high-profile report concluded that shoddy navigation, maintenance shortfalls and a baffling lack of oversight created a maelstrom of errors that led to two U.S. Navy patrol boats being seized at gunpoint in Iranian territorial waters.

The U.S. sailors were not even aware they had entered Iranian waters after deviating from their charted course between Kuwait and Bahrain in January. U.S. diplomats secured the sailors’ release unharmed after 16 hours in custody, a crisis that nearly scuttled the Iran nuclear deal.

“Clearly our actions in theater did not live up to the expectations of the Navy, or the American people,” said Adm. John Richardson, chief of naval operations, in his prepared remarks Thursday. “It is easy to imagine how these events could have ended in a far worse situation.”

The Navy’s five-month investigation, which has been the subject of both congressional scrutiny for months, found that the sailors piloting the boats didn’t properly plan the voyage, that the upkeep of the boats declined during the five-month deployment and caused a critical mechanical failure and that the staff ashore failed to properly track the riverine command boats.

In all, nine officers and enlisted are being disciplined for the incident, including three members of the boat crew, the commanding and executive officers of the riverine squadron, the commodore and chief of staff of the group in charge of the riverines and two members of the shore support staff, according to a defense official familiar with the ongoing personnel actions.

All but the commodore, Capt. Kyle Moses, have been recommended to face non-judicial punishment — a disciplinary measure that can effectively end a career but carries no criminal charges. The CRS 3 commodore at the time of the incident, Cmdr. Gregory Meyer, has also been relieved for cause, the CNO said.

Among the key findings of the investigation:

The investigation comes faulted the boats’ leadership — a junior officer and a senior enlisted crewmember — as well as the shore-side officer in charge in Kuwait.

“When tasked with the transit from Kuwait to Bahrain, the Kuwait detachment Officer-in-Charge and both [riverine command boat] leaders were derelict in their duties in that they failed to meet even the most basic requirements of leadership, planning, and tactical execution,” the investigation said.

The investigation also said their lack situational awareness made their reaction times too slow when the boats were approached by the Iranian Revolution Guard Corps forces, limiting any remaining course to  avoid capture.

“Unprepared and unaware, the boat crews were late in responding to the approaching [Iranian Revolutionary Guard] patrol craft, delaying action to establish a heightened security posture,” the investigation reads. “Their lack of force protection left them with few realistic options to resist detention.”

The investigation also found that the actions of some of the crew members violated the code of conduct, which governs how U.S. service members behave when in captivity.

“The investigation also found some crewmembers did not meet code of conduct standards while in custody,” said Vice Adm. John Aquilino said in the Pentagon press briefing with CNO.

The lieutenant in charge of the transit was quoted in an Iranian propaganda video apologizing for the errors that led them into Iranian waters when he was told that it was a condition of their release. In total, the sailors were in captivity for 16 hours.