A military judge ruled that Bowe Bergdahl, the soldier who left his post in Afghanistan in 2009 and was then captured by the Taliban for five years, will serve no prison time for his actions.

Instead, Bergdahl, who had pleaded guilty, was bucked from sergeant to private, received a dishonorable discharge and must make a $1,000 each month for 10 months.

This is in severe contrast to President Donald Trump’s wishes, which he expressed on Twitter, that Bergdahl should receive the death penalty. And as it turns out, Trump’s comments played a role in the judge’s decision.

“I will consider the president’s comments as mitigation evidence as I arrive at an appropriate sentence,” the judge, Army Colonel Jeffrey Nance, said last week.

NPR noted that the military justice system forbids commanders from influencing legal cases. That includes the president, who is the commander-in-chief of the military.

On the campaign trail, Trump had referred to Bergdahl as a “dirty rotten traitor” who should be executed by firing squad or thrown out of a plane without a parachute (which was a common extrajudicial tactic of the authoritarian military junta in the 1970s and 1980s). Trump had called Bergdahl a traitor at least 45 times during speeches.

Nance had previously said Trump’s comments were “disturbing,” but hadn’t influenced the case. He later postponed the sentencing in October after seeing a video of Trump publicly claim that he couldn’t talk about the case but said, “But I think people have heard my comments in the past.”

After the sentencing, Trump weighed in on the matter, calling the sentencing a disgrace to the country and the military.

Bergdahl’s attorney said in a statement that “President Trump’s unprincipled effort to stoke a lynch-mob atmosphere while seeking our nation’s highest office has cast a dark cloud over the case.”

Army investigators had said Bergdahl apparently had left his post in Afghanistan in 2009 to hike to a larger base to report problems regarding his unit, but was captured by the Taliban, the New York Times reported. Military prosecutors had asked Nance to hand down a 14-year prison sentence.