FORT BRAGG, N.C., Oct 16 (Reuters) - U.S. Army Sergeant Bowe Bergdahl, accused of endangering fellow soldiers who searched for him after he walked off his combat outpost in Afghanistan in 2009 and was captured by the Taliban, entered a guilty plea in his case on Monday.
Bergdahl, 31, appeared in court in Fort Bragg, North Carolina, where he was scheduled to stand trial this month on charges of desertion and misbehavior before the enemy, with the latter offense carrying a possible life sentence.
The Idaho native has been derided by Republicans who criticized the Obama administration for the Taliban prisoner swap in 2014 that won his release after five years in captivity. During last year's presidential campaign, Donald Trump called Bergdahl "a no-good traitor who should have been executed."
Bergdahl's lawyers argued such comments made it impossible for him to get a fair trial, but military judges refused to dismiss the charges.
RELATED: A look at Bowe Bergdahl
SAN ANTONIO, TX - JUNE 13: (From left) Colonel Bradley Poppen, Ph.D., Major General Joseph P. DiSalvo, and Colonel Ronald N. Wool deliver a press conference at the Fort Sam Houston Golf Course July 13, 2014 in San Antonio, Texas. They are reporting on Sgt. Bowe Bergdahl, his return to the United States, and reintegration at Brooke Army Medical Center after being a prison of war under Taliban captivity. (Photo by Drew Anthony Smith/Getty Images)
WASHINGTON, DC - MAY 31: President Barack Obama walks with the parents of Sgt. Bowe Bergdahl, Jani Bergdahl (L) and Bob Bergdahl (R) back to the Oval Office after making a statement regarding the release of Sgt. Bergdahl from captivity May 31, 2014 in the Rose Garden at the White House in Washington, DC. Sgt. Bowe Bergdahl was held captive by militants for almost five years during the war in Afghanistan. (Photo by J.H. Owen-Pool/Getty Images)
Bob Bergdahl, the father of freed US soldier Bowe Bergdahl, speaks following the release of his son, US soldier Bowe Bergdahl, in the Rose Garden of the White House on May 31, 2014 in Washington, DC. US President Barack Obama and the Bergdahl's spoke after the release of Bowe Bergdahl by the Taliban in Afghanistan. MANDEL NGAN/AFP/Getty Images
Supporters of freed prisoner of war US Army soldier Bowe Bergdahl including representatives of the ANSWER Coalition, CODEPINK and March Forward, rally in front of the White House in Washington, DC, June 10, 2014, to welcome Bergdahl home after 5-years of being held by the Taliban in Afghanistan. AFP PHOTO / Saul LOEB (Photo credit should read SAUL LOEB/AFP/Getty Images)
WASHINGTON, DC - JUNE 11: U.S. Defense Secretary Chuck Hagel testifies before the House Armed Services Committee about the about the prisoner exchange that freed Army Sgt. Bowe Bergdahl in the Rayburn House Office Building on Capitol Hill June 11, 2014 in Washington, DC. The trade of Bergdahl for five senior Taliban officials has angered some members of Congress because they were not informed of the swap beforehand. (Photo by Chip Somodevilla/Getty Images)
WASHINGTON, DC - JUNE 11: U.S. Secretary of Defense Chuck Hagel listens during a hearing before the House Armed Services Committee June 11, 2014 on Capitol Hill in Washington, DC. The committee held the hearing to examine the exchange of five Taliban prisoners from Guantanamo Bay for the release of U.S. Army Sergeant Bowe Bergdahl who had been held for almost five years by the insurgents in Afghanistan. (Photo by Alex Wong/Getty Images)
HAILEY, ID - JUNE 01: A sign announcing the release of Sgt. Bowe Bergdahl sits in the window of the Hailey Paint and Supply store on Main Street June 1, 2014 in Hailey, Idaho. Sgt. Bergdahl was captured in Afghanistan in 2009 while serving with U.S. Armys 501st Parachute Infantry Regiment in Paktika Province. Yesterday he was released after a swap for 5 prisoners being held at Guantanamo Bay was arranged. Bergdahl was considered the only U.S. prisoner of war held in Afghanistan. (Photo by Scott Olson/Getty Images)
Discover More Like This
BACK TO SLIDE
"We may as well go back to kangaroo courts and lynch mobs that got what they wanted," Bergdahl said in a 2016 interview with a British filmmaker obtained by ABC News/Good Morning America and aired on Monday. "The people who want to hang me, you're never going to convince those people."
In the interview, Bergdahl did not say why he left his military post before he was captured but rejected the notion that he sympathized with his captors.
"It's very insulting, the idea that they would think I did that," he said, adding he was confined to a small cage for more than four years.
Bergdahl, who was charged in 2015, remains on active duty in a clerical job at a base in San Antonio. He said in a podcast in 2015 that he left his post to draw attention to “leadership failure” in his unit.
The official search for him lasted 45 days, but the United States spent years trying to determine his whereabouts and bring him home.
During that time, he endured torture, abuse and neglect at the hands of Taliban forces, a military expert testified previously.
(Additional reporting by Jim Forsyth in San Antonio and Chris Kenning in Chicago; Editing by Peter Cooney and Bernadette Baum)