Navy officials said Wednesday they are pulling achievement medals from prosecutors who argued the case against a decorated Navy SEAL who was acquitted in the death of a wounded Islamic State captive after President Donald Trump intervened.

Trump tweeted earlier Wednesday that he had directed the secretary of the Navy and the chief of naval operations to "immediately withdraw and rescind" the Navy Achievement Medal from prosecutors who argued the case against Special Operations Chief Edward Gallagher, who was acquitted by military jurors earlier this month.

"The Prosecutors who lost the case against SEAL Eddie Gallagher (who I released from solitary confinement so he could fight his case properly), were ridiculously given a Navy Achievement Medal," Trump complained, adding, "I am very happy for Eddie Gallagher and his family!"

Navy spokesman Cdr. Jereal Dorsey said that on Wednesday, after Trump's tweet, Navy Secretary Richard Spencer rescinded the awards. As secretary, he has that authority, Dorsey said.

The move appeared to be a highly unusual presidential intervention in a case Trump had personally championed and drew immediate condemnation. Former Pentagon spokesman David Lapan, a retired Marine colonel, said the move represented the "further politicization of our military" and was a "ludicrous" move "in the face of so many more important and pressing personnel issues."

The military publication Task & Purpose first reported that, after Gallagher was found not guilty, members of the U.S. government team that prosecuted him were awarded medals for their "superb results" and "expert litigation."

Ten awards were given out earlier in July to members of the team and people associated with the case by the Navy's Region Southwest Legal Service Office in San Diego, seven Navy achievement medals and three letters of accommodations.

Trump in his tweets complained that the prosecutors not only lost their case, but also "had difficulty with respect...to information that may have been obtained from opposing lawyers and for giving immunity in a totally incompetent fashion."

Gallagher's trial came after a judge removed the lead prosecutor over a bungled effort that used software to track emails sent to defense lawyers in order to find the source of leaks to the media.

The judge determined the effort violated Gallagher's constitutional rights and, before the case went to trial, reduced the maximum possible punishment for the murder charge from life in prison without parole to the possibility of parole.

Defense lawyers had argued that Gallagher was framed by junior disgruntled platoon members who fabricated the allegations to oust their chief. The prosecution said Gallagher was incriminated by his own text messages and photos, including one of him holding the dead militant up by the hair and clutching a knife in his other hand. Several SEALs testified that Gallagher stabbed the militant, including two who said they saw Gallagher plunge the knife into his neck.

In the end, the jury of five Marines and two sailors — all war zone veterans — acquitted Gallagher of murder, attempted murder and other charges in the killing of the Islamic State captive — dealing a major blow to one of the Navy's most high-profile war crimes cases.

He was convicted of a single count of posing with a human casualty and given the maximum sentence of four months' confinement for the offense.

Gallagher will serve no jail time because he spent nearly nine months in pre-trial custody. The jury also called for his rank to be reduced, hurting his benefits just as the 19-year veteran prepares to retire.

His lawyers say they will fight the sentencing.

Associated Press writers Lolita C. Baldor in Washington and Julie Watson in San Diego contributed to this report.