SAN DIEGO (AP) — A Navy admiral dismissed charges Thursday against an officer accused of not reporting war crimes by a Navy SEAL later acquitted of murder, and ordered a review of the service's justice system.

The action by the chief of naval operations in the case of Lt. Jacob Portier is the latest blow to military prosecutors and comes a month after a military jury cleared Special Operations Chief Edward Gallagher of murder and attempted murder charges.

Portier, the officer in charge of Gallagher's platoon, faced charges of dereliction of duty, destruction of evidence and holding Gallagher's re-enlistment ceremony next to the corpse of a teen Islamic State militant the decorated SEAL was accused of stabbing to death after treating the boy's wounds.

Richardson dismissed the case because it was "in the best interest of justice and the Navy," according to a statement.

Gallagher was convicted of a single charge of posing for photos with the 17-year-old militant's corpse. He was sentenced to the maximum penalty of four months but will serve no additional jail time because it is less than the time he spent in confinement awaiting trial.

The move by Adm. John Richardson comes a day after President Donald Trump ordered the secretary of the Navy on Wednesday to strip prosecutors of medals they were awarded for their handling of the case despite the fact Gallagher was acquitted on the most serious charges.

Defense attorney Jeremiah J. Sullivan III said Portier was relieved to get the news and is still "proud to wear the uniform" and would happily return to combat.

Sullivan, a former Navy prosecutor and military judge, said events of the last two days were a scathing indictment against military prosecutors and he wouldn't be surprised if resignations follow.

"The legal military justice system — their integrity has just been eviscerated," Sullivan said. "It's certainly discrediting to the Navy leadership to have the president of the United States strip away awards."

A prosecutor who had been removed from the case before trial — and not given a medal — was admonished for taking part in an effort that used software to track emails sent to the defense team that a judge said violated Gallagher's constitutional rights.

The email tracking was meant to ferret out the source of leaks to the news media that plagued the case but the Navy said it never found the leak.

The Gallagher case was further doomed at trial when one of his fellow SEALs took the stand for the defense and admitted killing the Islamic State militant himself.

Corey Scott, who testified with immunity from prosecution, said Gallagher had stabbed the teen. But he stunned the court when he told the jury the boy would have survived those wounds except that Scott had plugged his breathing tube.

Prosecutors were investigating Scott for perjury, but Richardson on Thursday blocked prosecutors from taking any action against him.

Defense lawyer Brian Ferguson said Scott was "profoundly grateful" the chief of naval operations intervened to exonerate Portier. He also thanked the president for his interest in the case.

Scott called Portier “a model of courage on the battlefield in the fight against ISIS and back home in the defense of his platoon,” Ferguson said.