Army deserter Bowe Bergdahl doubts he could get a fair trial after Trump comments Bergdahl pleaded guilty to charges of desertion at a court martial today.

 -- Former Taliban prisoner Sgt. Bowe Bergdahl pleaded guilty to charges of desertion and misbehavior before the enemy after a short military hearing at Fort Bragg, North Carolina, on Monday after expressing doubts that he could get a fair trial after campaign statements by Donald Trump.

Despite surviving five years in a Taliban cage, Bergdahl, Trump said in several campaign speeches as a presidential candidate, was a "traitor" who should be executed.

In an on-camera interview shot last year by a British filmmaker, obtained exclusively by ABC News and airing today on "Good Morning America," "World News Tonight With David Muir" and "Nightline," Bergdahl says the words of the man who is now his commander in chief would have made a fair trial impossible.

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

Bergdahl, a 501st Parachute Infantry Regiment trooper, walked off his combat outpost in Afghanistan in June 2009 and was quickly captured by the Taliban. During his five years in captivity with the Haqqani Network — the same Taliban faction that held American Caitlan Coleman and her family hostage for five years until they were freed last Wednesday — he endured what one U.S. official called the worst case of prisoner abuse since the Vietnam War.

He was released in 2014 in exchange for five Taliban prisoners at Guantanamo Bay — a deal that was harshly criticized on the campaign trail by then-candidate Trump, who called Bergdahl "garbage" and even suggested that he should have been summarily executed.

"You know, in the old days — bing, bong," Trump said as he mimicked firing a rifle. "When we were strong."

Speaking to British war filmmaker Sean Langan, who was held captive by the same Taliban group in 2008, Bergdahl says he wants to fight back against what he calls a false narrative fueled by conservative outlets like Fox News that sought to portray him as a traitor and jihadi sympathizer who had been persuaded to fight against the United States alongside his captors.

Such rumors are false, military officials have said.

"You know, it's just insulting, frankly," Bergdahl tells Langan. "It's very insulting, the idea that they would think I did that."

In 2014, then–Fox News correspondents Megyn Kelly and James Rosen reported on "secret documents" obtained by the network that purported to show Bergdahl had "shown affection" for his captors, converted to Islam and become a "mujahid," or jihadi.

According to Bergdahl, however, he thought the conditions in captivity might kill him before his captors could.

"It was getting so bad that I was literally looking at myself, you know, looking at joints, looking my ribs and just going, 'I'm going to die here from sickness, or I can die escaping,'" he says. "You know, it didn't really matter."

He attempted to escape twice, according to military officials, and he was severely punished after being recaptured. Terrence Russell, a military official who debriefs former U.S. captives for the U.S. Joint Personnel Recovery Agency, says Bergdahl was tortured in a way reminiscent of the brutality visited upon prisoners of war in Vietnam decades ago.

"When they recaptured him and brought him back, the next day they spread-eagled and secured him to a metal bed frame," Russell says to Langan in another video. "They took a plastic pipe … and they started beating his feet and his legs repeatedly with this plastic pipe … The idea was to just beat him and injure his legs and his feet so that he could not walk away again."

Bergdahl also says he was confined for more than four years to a cage that was only 7 feet by 6 feet.

"From first year," Bergdahl says when asked how much time he spent in that cage. "So second, third, fourth and then into the fifth year."

It remains a mystery, however, why he walked off his post.

Another senior official who spoke to Langan for his documentary was retired Army Lt. Gen. Michael Flynn, who, as the former head of intelligence for special operations in Afghanistan and then as the director of the Defense Intelligence Agency, was deeply involved in the early search for Bergdahl.

He also briefly served as Trump's national security adviser after working on his campaign, and he tells Langan that he "absolutely" believes Bergdahl left his base with the intention to meet the Taliban.

But Bergdahl disputes that, saying in a taped conversation with filmmaker Mark Boal that was broadcast in the second season of the "Serial" podcast that he walked off post in an attempt to report to senior officers that his platoon commander was "unfit" for his position.

Bergdahl has not been charged with any crime related to aiding the enemy.

Whatever his reasons were, at least two soldiers were seriously wounded during the search to find him, as ABC News first reported in 2014. In response to questions from Army Judge Col. Jeffery Nance on Monday, Bergdahl admitted multiple times that he did not fully appreciate the enormity of his actions.

"At the time, I had no thoughts anyone would come searching for me … however looking back I see it was a very obvious mistake,” Bergdahl said. “I believed they would notice me missing, but I didn't think they would pull off a crucial mission to look for one private."

After his guilty plea, the question remaining before the military is what form of punishment Bergdahl deserves. On that question, even Flynn doubts that justice would be best served by putting a former prisoner back in prison.

"So the guy deserted his men, his soldiers, his squad — no doubt," Flynn says. "[But] I don't think he should serve another day in any sort of confinement or jail or anything like that, because frankly, even though he put himself into this situation to a degree, we — the United States government and the United States military — put him in Afghanistan."

ABC News’ Sarah Kolinovsky and Dylan Goetz contributed to this report.