The Navy has fired the commander of the 10 American sailors who wandered into Iranian territorial waters in the Persian Gulf and were captured and held by Iran for about 15 hours.

In a statement Thursday, the Navy said it had lost confidence in Cmdr. Eric Rasch, who was the executive officer of the squadron that included the 10 sailors at the time of the January incident. He was responsible for the training and readiness of the more than 400 sailors in the unit.

A Navy official said Rasch failed to provide effective leadership, leading to a lack of oversight, complacency and failure to maintain standards in the unit. The official was not authorized to discuss the details publicly so spoke on condition of anonymity.

Rasch has been relieved of his command duties and reassigned, the Navy said.

Although this is the first firing by the Navy regarding the incident, several other sailors received administrative reprimands. The investigation is expected to be finished by the end of the month, and others are likely to be disciplined.

Rasch was promoted to commander of the unit in April — after the Iran incident occurred, but before the preliminary investigation was done.

The sailors, nine men and one woman, were detained after their boat drifted into Iranian waters off Farsi Island, an outpost in the middle of the Persian Gulf that has been used as a base for Revolutionary Guard speedboats since the 1980s.

The sailors were on two small armed vessels, known as riverine command boats, on a 300-mile journey from Kuwait to Bahrain, where the Navy's 5th Fleet is located. The incident, while brief, raised tensions between the U.S. and Iran because of images Iran published of the soldiers kneeling with their hands on their heads. It caused political uproar at home, too, coming on the day of President Barack Obama's final State of the Union address and months after the signing of a deal with Iran to curb its nuclear program in exchange for relief from financial penalties.

Navy Capt. Gary Leigh, commander of Riverine Group 1, decided to fire Rasch after Leigh reviewed the initial investigation. A Navy official said no action has been taken, at least so far, against Cmdr. Greg Meyer, who was serving as commander of the squadron when the incident happened. He is no longer in a command job.

Defense Secretary Ash Carter said the sailors made a navigational error and went off course.

An initial account said the "planned transit path for the mission was down the middle of the Gulf and not through the territorial waters of any country other than Kuwait and Bahrain."

That account said the crew stopped when a diesel engine in one of the boats appeared to have a mechanical issue. The second boat also stopped.

At this point they were in Iranian territorial waters, "although it's not clear the crew was aware of their exact location," the report said.

While the boats were stopped and the crew was trying to assess the mechanical problem, two small Iranian craft carrying armed personnel approached. Soon after, they were joined by two more Iranian military vessels. A verbal exchange ensued between the Iranians and Americans, but there was no gunfire.

The sailors had been scheduled to meet up with a U.S. Coast Guard ship, the Monomoy, in international waters to refuel. But about 10 minutes before the refueling was supposed to take place, the Navy headquarters in Bahrain got a report that Iranians were questioning the crew members.

Soon afterward, the Navy lost communications with the boats.

The Navy launched a large-scale search-and-rescue mission, but it is not clear whether the Americans had already been taken ashore on Farsi Island. The Iranians eventually told the U.S. that the 10 sailors were safe and healthy.

Secretary of State John Kerry, in a series of phone calls, used the personal relationship he has formed with Iranian Foreign Minister Mohammad Javad Zarif to work out the crews' release. Kerry credited the quick resolution to the "critical role diplomacy plays in keeping our country secure and strong."