The leaders of the elite U.S. Navy SEAL Team 7 were relieved of duty Friday after allegations were raised about a sexual assault and drinking while units were deployed in Iraq, military officials said.

A defense official told NBC News the action was related to a claim by a woman who said she was sexually assaulted by a member of the team over the 4th of July weekend and allegations that platoon members were drinking in the combat zone.

The three team leaders are being held responsible for the character of their platoon, the defense official said.

The three, identified as Cmdr. Edward Mason, the commanding officer; Lt. Cmdr. Luke Im, the executive officer; and Command Master Chief Hugh Spangler, the platoon's top enlisted leader, will be moved to other jobs, said Naval Special Warfare Command Capt. Tamara Lawrence.

One senior enlisted team member, who was not named, will also be redeployed, Lawrence said.

"The reliefs are the result of a loss of confidence in their ability to command and ability to lead, respectively, following leadership failures that resulted in a breakdown of good order and discipline within the unit while deployed to a combat zone," she said.

The move followed an announcement by Gen. Richard Clarke in August of a comprehensive review of Special Operations Forces' culture and ethnics. He cited "recent incidents."

In late August, NBC News obtained a memo from Rear Adm. Collin Green, commander of Naval Special Warfare Command, which called for sweeping changes and criticized a drift "from our Navy core values of Honor, Courage, and Commitment" and "lack of action at all levels of leadership."

In the memo, Green lays out guidance on a "back to basics" leadership approach.

Green redeployed the Team 7 leaders, Lawrence said. The defense official said they were awaiting reassignment.

Separately in July, Special Operations Chief Edward Gallagher was acquitted by a military jury of murder in the death of a teen ISIS fighter when he was deployed with Team 7 in Iraq in 2017.