Updated

Army Sgt. Bowe Bergdahl is expected to plead guilty later this month to desertion and misbehavior before the enemy rather than face trial for leaving his Afghanistan post in 2009, The Associated Press reported.

Two sources said the Idaho native would submit the plea later this month and sentencing would start Oct. 23. The AP did not name the sources.

Bergdahl's lawyer declined to comment when contacted by Fox News. He faces up to five years in prison on the desertion charge and a life sentence for misbehavior.

Bergdahl, 31, who was serving with an Alaska-based infantry regiment, deserted his Afghanistan post in 2009, when he was 23 years old, and was held captive by the Taliban for about five years. The Taliban posted a video online showing Bergdahl saying he was "scared" he would not be able to go home.

AFGHANISTAN-USA/SOLDIER

The Taliban released videos of Bowe Bergdahl being held hostage. (Reuters)

Bergdahl said he had been caged, kept in the darkness, beaten and chained to a bed when he was kept captive.

The Army sergeant claimed he was lagging behind a patrol when he was captured. He also said he left his post to alert people about problems he perceived within his unit. Investigators said Bergdahl suffered from schizotypal personality disorder at the time he left his post.

In December 2009, the Taliban released another video showing Bergdahl apparently healthy and delivering a lengthy statement criticizing the U.S. military operation.

51dfc964-USA-AFGHANISTAN/BERGDAHL

Army Sgt. Bowe Bergdahl was released after the Obama administration exchanged five Guantanamo Bay detainees for the soldier. (Reuters)

He was released in May 2014 for five Taliban detainees locked in Guantanamo Bay by the Obama administration. The exchanged was viewed as controversial at the time due to the debate about negotiating with hostage takers. The exchange also fueled a debate about whether Bergdahl was a hero or a deserter.

President Barack Obama stood with Bergdahl’s parents in the White House Rose Garden and defended the swap.

The U.S. does not "leave our men or women in uniform behind," Obama said then, regardless of how Bergdahl came to be captured.

c5474423-USA-AFGHANISTAN/BERGDAHL

There has been much debate surrounding the exchange of prisoners for Sgt. Bowe Bergdahl's release. (Reuters)

"Whatever those circumstances may turn out to be, we still get an American soldier back if he's held in captivity," Obama said. "Period. Full stop."

Many viewers noticed Bergdahl’s father, Bob, and his long beard as he stood next to Obama. The Washington Post reported Bob Bergdahl read books and articles about the “foreign world that held his son.” He also learned how to speak Pashto, the official language of Afghanistan. He told Time he started growing the beard after learning that his son had been captured.

1b4985c9-USA-AFGHANISTAN/BERGDAHL-PRESIDENT

Many viewers noticed Bergdahl’s father, Bob, and his long beard as he stood next to the president. (Reuters)

In March 2015, he was formally charged. In December, Bergdahl requested a pardon from then-President Obama before he left office, Fox News reported. The pardon was not granted.

Some of Bergdahl's fellow soldiers want him held responsible for any harm suffered by those who went looking for him. The judge ruled a Navy SEAL and an Army National Guard sergeant wouldn't have found themselves in separate firefights if they hadn't been searching.

The U.S. troops who were seriously wounded during their search for Bergdahl in Afghanistan were expected to testify, the sources stated.

During the presidential campaign, Donald Trump called Bergdahl a “dirty, rotten traitor” during a town hall in August 2015. Trump also tweeted in 2015 that Bergdahl should "face the death penalty."

Fox News' Brooke Singman, Kaitlyn Schallhorn and The Associated Press contributed to this report.