Bowe Bergdahl, the Army sergeant who spent five years in Taliban captivity after disappearing from his patrol base in Afghanistan, is expected to plead guilty to desertion and misbehavior charges, the Associated Press reported Friday.

Bergdahl’s court-martial was scheduled to begin later this month. Now, instead of a jury, a military judge will determine his sentence and whether the 31-year-old will spend any more time incarcerated, the AP reported. He faces life in prison and a dishonorable discharge from the Army.

Prosecutors say Bergdahl left his post without permission in 2009. They’ve argued that his actions resulted in the death and injury of other troops sent to search for him.

Bergdahl says he was beaten, caged and tortured, held in abhorrent conditions until the Obama administration in 2014 swapped five Taliban detainees in exchange for his release. That controversial decision has challenged one of the military’s bedrock values: to always bring back its troops, living or dead.

One of Bergdahl’s harshest critics has been his commander in chief, President Trump, who has called him a “dirty, rotten traitor” and suggested that, in prior eras, Bergdahl would have been executed.