 -- Army Sgt. Bowe Bergdahl pleaded guilty on Monday to charges of desertion with intention to shirk duty and misbehavior before the enemy stemming from his 2009 disappearance and capture by the Taliban.

Bergdahl drew international headlines after he left his Army outpost in Afghanistan over eight years ago. He was captured and held by the Taliban for almost five years until his release was negotiated in 2014 by the Obama administration as part of a prisoner exchange. Upon his return to the United States, Bergdahl returned to duty while an investigation probed the circumstances surrounding his disappearance. He was formally charged in March 2015.

The misbehavior before the enemy charge carries a maximum sentence of life in prison, though sentencing won't take place until later this month. Judge Jeffrey Nance, presiding over the case, questioned Bergdahl on Monday to ensure he understood the charges and consequences of pleading guilty. No pre-trial agreement or plea bargain was made in the case.

In interviews with the podcast "Serial" in December 2015, Bergdahl explained that his lack of confidence in leadership at Combat Outpost Mest-Malak in Paktika province in Afghanistan prompted his decision to embark on an 18-mile hike to a nearby base to report his concerns. He said he realized he made a mistake only 20 minutes after leaving his base.

Republicans in Washington were critical of Bergdahl's negotiated release in 2014, portraying the Obama administration as having negotiated with terrorists. A 2015 report by Republican members of the House Armed Services Committee argued that Congress was misled by the administration about the exchange, which released five Taliban prisoners in Guantanamo Bay to Qatar.

Donald Trump frequently assailed Bergdahl during last year's presidential campaign, referring to Bergdahl as a "dirty, rotten traitor" and a "bum." Attorneys for Bergdahl requested to have potential jurors answer questions about Trump in a pretrial questionnaire, though Nance declined in June to include a question on whether potential jurors voted for Trump.

In an interview recorded last year and obtained by ABC News, Bergdahl said that because of Trump's statements, he did not believe he would be able to receive a fair trial.

"We may as well go back to kangaroo courts and lynch mobs that got what they wanted," Bergdahl said. "The people who want to hang me — you're never going to convince those people."

In an afternoon session Monday, Nance read the guilty verdicts as a formality and discussed with the legal teams the procedures to have witnesses testify during the trial's sentencing phase, which will resume on Oct. 23.