Bergdahl, a U.S. Army soldier, left his post while on duty in Afghanistan’s Paktika province on the night of June 30, 2009. He was captured by the Taliban shortly after, and was held captive by the militants of the Haqqani network for the next five years. Throughout his trial, Bergdahl recounted the extremely challenging conditions of his years in captivity and said he was tortured, beaten and humiliated by the militants.

Bergdahl was freed in May 2014 as part of a prisoner swap negotiated between the administration of former President Barack Obama and the Taliban. After returning to the United States, he pleaded guilty to desertion and misbehavior before the enemy. Prosecutors sought 14 years of imprisonment.

Trump has been fiercely critical of the agreement that secured Bergdahl’s release.

Trump also called the soldier a “traitor” at least 45 times while he was campaigning. “We’re tired of Sgt. Bergdahl, who’s a traitor, a no-good traitor, who should have been executed,” Trump said during an October 2015 campaign rally. During an Iowa campaign rally months later, Trump suggested Bergdahl should be “thrown out of an airplane without a parachute.”

With his fierce rhetoric on Bergdahl, Trump once again dived into an issue that divides Americans. Bergdahl’s case has sparked fierce emotions among politicians, the general public and the military alike. Bergdahl’s defenders have argued he was young at the time and suffered from mental health conditions. They also pointed out the solder tried to escape several times while detained, and brought back important intelligence information on his captors.

Opponents have questioned Bergdahl’s account of his years in captivity and blame him for needlessly risking the lives of the soldiers who were sent out to look for him.

Earlier this month, Bergdahl’s defense team argued that Trump’s comments in the case had harmed Bergdahl’s chances of getting a fair trial. Nance dismissed the motion, but ruled he would consider the president’s response a mitigating factor.

Eugene Fidell, an attorney for Berghdal, said on Friday that Trump’s comments in the case should give Americans pause. “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,” Fidell said, according to Reuters.