​President Trump said Wednesday that he would order the Navy to rescind medals given to military lawyers who prosecuted a ​former ​Navy SEAL the president supported during his court martial on murder charges.

“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 wrote on Twitter.

“I have directed the Secretary of the Navy Richard Spencer & Chief of Naval Operations John Richardson to immediately withdraw and rescind the awards​,” Trump continued.

​”I am very happy for Eddie Gallagher and his family!​”

The four attorneys who prosecuted Gallagher were given Navy Achievement Medals last month, the Navy Times reported.

Gallagher, 40, was acquitted by a military jury July 3 of a murder charge in connection with the 2017 death of an ISIS fighter in Iraq and released after getting credit for time served.

The commando thanked Trump for intervening in his case.

Trump returned the praise, tweeting, “Congratulations to Navy Seal Eddie Gallagher, his wonderful wife Andrea, and his entire family. You have been through much together. Glad I could help!”

The president had Gallagher transferred from a military brig to a less restrictive facility.

​