Bowe Bergdahl was dishonorably discharged from the Army, but but would not serve any prison time, a military judge ruled Friday. Bergdahl pleaded guilty to desertion and misbehavior before the enemy, after walking off his base in Afghanistan in 2009.

President Donald Trump, who advocated for Bergdahl’s execution during the campaign, was not happy with the sentence.

Advertisement:

“The decision on Sergeant Bergdahl is a complete and total disgrace to our Country and to our Military,” he tweeted from aboard Air Force One.

The decision on Sergeant Bergdahl is a complete and total disgrace to our Country and to our Military. — Donald J. Trump (@realDonaldTrump) November 3, 2017

The sentence also reduced Bergdahl’s rank from sergeant to private and will require him to relinquish $1,000 from his salary for each of the next 10 months.

Advertisement:

After being captured by the Taliban, Bergdahl spent five years as a prisoner, and “was beaten with copper cables, and held in isolation in a metal cage less than seven feet square,” wrote The New York Times. The report added that he “suffered dysentery for most of his captivity, and cleaned feces off his hands with his own urine so that he could eat enough bread to survive.”

In 2014, Bergdahl was released by the Taliban in exchange for five Guantanamo detainees handed over by the Obama administration. Republicans were angered by this decision, and argued that Bergdahl had endangered the troops who had searched for him, including Sergeant First Class Mark Allen, who sustained a shot to the head and can no longer “walk, talk or take care of himself,” reported the Times.

Bergdahl's endangerment of troops was a key part of the prosecution's case; they felt he deserved prison time for purposely leaving his post and putting other soldiers in harm's way during their searches for him.

Advertisement:

The defense argued that Bergdahl had suffered mental illness, “including schizotypal personality disorder and post-traumatic stress disorder, according to Dr. Charles Morgan, a forensic psychiatrist and professor at the University of New Haven and Yale University,” reported CNN. Captain Nina Banks, one of Bergdahl’s defense attorneys, said that “he probably should not have been in the Army” in the first place. The defense also argued that Bergdahl had suffered enough for his actions during the five years he endured as a prisoner of the Taliban.

Trump’s rhetoric on the campaign trail could actually have had the opposite effect he wanted; his comments about Bergdahl being a “dirty, rotten traitor” and suggestions that he should be thrown out of a plane were argued by the defense attorneys to be a violation of Bergdahl’s Sixth Amendment right to a fair trial, said Time.

Advertisement:

Though the judge, Colonel Jeffery R. Nance, declined to dismiss the case on Sixth Amendment grounds, he said on Monday, “I will consider the president’s comments as mitigation evidence as I arrive at an appropriate sentence.”

“I’m admitting I made a horrible mistake,” said Bergdahl on the witness stand, according to the Times. The term “mistake” did not sit well with the prosecution, but Banks reiterated that “Sergeant Bergdahl has been punished enough.”