Retired Gen. Martin Dempsey slammed President Trump for his plan to pardon several military members charged with war crimes.

“Absent evidence of innocence or injustice the wholesale pardon of US servicemembers accused of war crimes signals our troops and allies that we don’t take the Law of Armed Conflict seriously. Bad message. Bad precedent. Abdication of moral responsibility. Risk to us. #Leadership,” Dempsey said Tuesday on Twitter.

Dempsey was the chairman of the Joint Chiefs of Staff from 2011 to 2015, the only officer to occupy the post for a full four-year term under President Barack Obama.

In August 2016, Dempsey blasted fellow generals for becoming involved in politics after retired Lt. Gen. Michael Flynn spoke at the Republican convention and retired Gen. John Allen spoke at the Democratic convention.

[ Related: Crenshaw breaks with Trump on Navy SEAL case: Gallagher should face trial before any war crimes pardon]

"More than an individual reputation, retired generals and admirals enjoy a collective reputation earned by having been part of a profession. It is therefore nearly impossible for them to speak exclusively for themselves when speaking publicly. If that were even possible, few would want to hear from them. Their opinion is valued chiefly because it is assumed they speak with authority for those who have served in uniform."

He added: "So retired generals and admirals can but should not become part of the public political landscape. That is, unless they choose to run for public office themselves. That’s different. If they choose to run themselves, they become accountable to voters. In simply advocating—or giving speeches—they are not."

It was reported last week that Trump had started the process of pardoning several service members who had been accused of war crimes or convicted of war crimes.

The impending Trump pardons are expected to include Maj. Mathew Golsteyn, Navy SEAL Chief Edward Gallagher, a Blackwater security contractor, and a group of Marine Corps snipers.

Last week, Trump pardoned a former Army Lt. Michael Behenna, 35, who was convicted of murdering an Iraqi prisoner. Behenna has maintained he acted in self-defense, and has been on parole since 2014.

[ Also read: Trump's Army murder pardon gives hope to others convicted of war crimes]