Three senior leaders of Navy SEAL Team 7 have been removed from their positions following revelations that their subordinates were engaged in misbehavior while deployed to Iraq.

Rear Adm. Collin Green removed the leaders "due to a loss of confidence that resulted from leadership failures." Those removed include commanding officer Cmdr. Edward Mason, executive officer Lt. Cmdr. Luke Im, and the top enlisted leader, Command Master Chief Hugh Spangler.

Members of Team 7 were found to have engaged in drinking during their downtime while fighting ISIS in Iraq, a violation of standing orders banning alcohol use while deployed. The drinking was discovered during the course of an investigation into an alleged sexual assault perpetrated by one of the team members. The entire team was sent back home to San Diego as a result of the findings in July.

SEAL Team 7 came under scrutiny earlier this year during the trial of Eddie Gallagher, a SEAL who was accused of war crimes. While Gallagher was found not guilty of war crimes, several examples of misbehavior and violations of Navy rules were discovered during the course of the trial. Gallagher was found guilty only of unlawfully taking a picture with the corpse of an ISIS fighter he was accused of murdering. Several of his teammates were also in the pictures but were not charged.

SEAL Team 10 has also faced unwelcome attention, after a Navy investigation found that team members used cocaine while stationed in Virginia. Some members admitted to cheating drug tests, if they even got tested at all.

These examples of bad behavior led Green to send a letter to his subordinates in late July, telling them in bold type, "We have a problem."

"I don't know yet if we have a culture problem, I do know that we have a good order and discipline problem that must be addressed immediately," Green wrote.

Green issued a four-page directive to senior SEAL leaders in August in an effort to reintroduce discipline and ethics to the force, directing them to engage in a rigorous process of inspections of their sailors and requiring Navy standard haircuts for all personnel.

"We are U.S. Naval Officers and Sailors first and foremost and we will realign ourselves to these standards immediately," Green wrote.