Ray Mabus, President Barack Obama’s former Navy secretary, slammed President Donald Trump on Monday morning for interfering in the case of Eddie Gallagher, a Navy SEAL who was charged with war crimes.

“This just dishonors the military so much, and it causes chaos and confusion,” Mabus told MSNBC host Hallie Jackson. “It undermines accountability, it undermines the rule of law, it undermines good order and discipline in the military.”

The ex-Navy secretary said Trump has “the right to do a lot of things” as the President, but “that doesn’t mean he should do them.”

“That doesn’t mean that he isn’t dishonoring the military by doing it,” he continued. “That doesn’t mean that he is not causing just confusion and chaos in the ranks.”

In early November, Trump reinstated Gallagher’s rank as chief petty officer against the Pentagon’s guidance after the Navy SEAL was convicted and subsequently demoted for taking a photo with the corpse of an ISIS soldier. Gallagher had also been charged with the murder of the soldier, but he was acquitted on the charge.

Then Trump tweeted last week that the Navy’s Trident Review Board would not be allowed to strip Gallagher of his Trident Pin, which represents Gallagher’s membership in the exclusive SEALs.

Defense Secretary Mark Esper fired Secretary of the Navy Richard Spencer on Sunday, claiming that Spencer had tried to secretly work out a deal with the White House in an effort to prevent Trump from intervening in the Trident Review Board’s process.

In a testy termination letter, Spencer said he no longer shares “the same understanding as the Commander in Chief who appointed me, in regards to the key principle of good order and discipline.”

Watch Mabus below: