All three also had been favorites among conservatives who see them as heroes who should not have been prosecuted

Trump personally called the three men after granting the pardons, which defied rulings made by military leaders seeking to punish the service members

And the demotion of Chief Petty Officer Edward Gallagher, a Navy SEAL who was acquitted of murder, but convicted on a lesser charge, was reversed

US President Donald Trump cleared three armed service members Friday, who were were accused or convicted of war crimes.

Trump cancelled murder charges against Army Green Beret Major Mathew L. Golsteyn, whose trial was set to begin next month.

The president also ordered the release of Clint Lorance, a former army lieutenant who had been convicted of murder for ordering soldiers under his command to open fire on three unarmed Afgan men, including two who died.

And Trump reversed the demotion of Chief Petty Officer Edward Gallagher, a Navy SEAL who was acquitted of murder, but convicted on a lesser charge in a war crimes case this summer.

'There are no words to describe how grateful my family and I are to our President - Donald J Trump for his intervention and decision', Gallagher said in a social media post after his demotion was reversed.

Army Green Beret Major Mathew J. Golsteyn, former Army Lieutenant Clint Lorance and Chief Petty Officer Edward Gallagher (pictured from left to right), were cleared of accusations made against by military commanders by President Donald Trump on Friday

Trump reversed the demotion of Chief Petty Officer Edward Gallagher (pictured with his family from a social media post made Friday). The Navy SEAL was acquitted of murder, but convicted on a lesser charge in a war crimes case this summer

A statement from Gallagher was posted on social media, thanking the president. 'There are no words to describe how grateful my family and I are to our President - Donald J Trump for his intervention and decision', the post reads

Trump personally called the three men after granting the pardons, which defied rulings made by military leaders seeking to punish the service members.

All three also had been favorites among conservatives who see them as heroes who should not have been prosecuted. Trump, when the White House was considering intervening in Golsteyn's case, commented at the time, 'We train our boys to be killing machines, then prosecute them when they kill'!

In explaining his decision to clear the three service members on Friday, the White House released a statement saying 'The president, as Commander-in-Chief, is ultimately responsible for ensuring that the law is enforced and when appropriate, that mercy is granted'.

'For more than two hundred years, presidents have used their authority to offer second chances to deserving individuals, including those in uniform who have served our country', the statement explains.

'These actions are in keeping with this long history. As the President has stated, 'when our soldiers have to fight for our country, I want to give them the confidence to fight''.

A court-martial for Golsteyn had been scheduled for December at Fort Bragg, North Carolina, but was postponed until February.

Major Mathew Golsteyn (pictured), an Army Special Forces officer who had been accused of killing a suspected bomb-maker, said he had believed the man was responsible for setting off an explosion that killed two US Marines

The former Green Beret had been accused of killing a suspected bomb-maker while deployed in Afghanistan in 2010.

Golsteyn has argued that the Afghan was a legal target because of his behavior at the time of the shooting.

Leading a team of Army Special Forces troops at the time, Golsteyn said he believed that the bomb-maker, known only as Rasoul, was responsible for an explosion that killed two US Marines - Sgt. Jeremy R. McQueary, 27, and Lance Cpl. Larry M. Johnson, 19.

The case attracted Trump's attention. He tweeted that Golsteyn is a 'U.S. Military hero' who could face the death penalty 'from our own government'.

Trump ordered the release of Clint Lorance (pictured), a former army lieutenant who was convicted of murder for ordering soldiers under his command to open fire on three unarmed Afgan men, including two who died

Lorance, an 82nd Airborne Division lieutenant, in August was sentenced to 20 years in prison, forfeiture of all pay and dismissal from the army after prosecutors said he recklessly ordered his men to open fire on the Afghan men in July 2012. The trio on motorcycles had approached his patrol in southern Afghanistan.

Prosecutors said this was in violation of the military's rules of engagement, which requires soldiers to hold fire unless they have evidence of hostile action or hostile intent.

Two of the men were killed and the third ran away.

Gallagher had his rank reduced from that of Senior Chief to Petty Officer First Class and was to have $10,000 docked from his pay. The 40-year-old was sentenced in July for the only charge he was convicted of - posing with the corpse of an ISIS fighter.

The conviction carries a maximum confinement sentence of four months but because Gallagher already had spent 10 months in the brig awaiting trial, it was considered time served.

The jury of five Marines and two Navy personnel decided the sentence.

Gallagher left the July 3 sentencing saying that he was fine about the demotion. 'The jury came with a verdict. I trust them', he said.

The 40-year-old, who had 20 years in the service, had been acquitted of murdering the ISIS fighter whose body he posed with, despite the testimony of seven SEALs who spoke against him during the court martial.

Trump that day celebrated the Navy SEAL for the court victory. 'Congratulations to Navy Seal Eddie Gallagher, his wonderful wife Andrea, and his entire family', the president said.