WASHINGTON — Even after five years of captivity, Sgt. Bowe Bergdahl could still face a lengthy investigation and trial on AWOL or desertion charges if the military concludes that he left his post without authorization before his capture by the Taliban.

Abandoning a post in a war zone is rare. "When you go AWOL from the combat theater, that escalates it pretty dramatically," said Bill Gavin of the Center on Conscience and War, an advocacy group.

AWOL charges in the United States are more common, and most are disposed of administratively, without convening a court-martial.

"It is intolerable in a military unit for a person to wander off," said Eugene Fidell, who teaches military justice at Yale Law School. "That's a message that has to be underscored."

Fidell and other legal analysts emphasize it is too early to draw any conclusions because few facts of the case are publicly known.

Bergdahl's time in captivity could also mitigate any sentence he might receive, even if convicted.

The Pentagon has said the military's focus remains on Bergdahl's health and reintegration into society. He is currently being treated at a military hospital in Landstuhl, Germany, where he is in stable condition.

He has not yet spoken with his parents and is still under treatment by military psychologists and other professionals, as part of a delicate reintegration process.

Military officials have said privately that Bergdahl appears to have voluntarily left his outpost in Afghanistan before his capture by militants. He was returned to U.S. custody May 31 as part of a prisoner swap in which the Obama administration traded five Taliban militants being held at Guantanamo Bay, Cuba.

The Army has said it will investigate the circumstances of his disappearance and capture.

Army commanders will have to weigh a number of factors in whether to press charges, including his current mental condition, the evidence and his years in captivity, military law experts said.

Political and public pressure could also complicate any future charges. A move that labels Bergdahl's actions as dishonorable would call into question President Obama's decision to trade him for the Taliban detainees, said Meagan Temple, a former Air Force judge advocate now in private practice.

The Pentagon has already conducted a thorough investigation into the circumstances of Bergdahl's disappearance, which was completed before the prisoner swap. The investigation includes witness testimony and other evidence, but it remains classified.

A subsequent investigation will likely include Bergdahl's own account of the disappearance.

If the military does pursue criminal charges, it will likely consider AWOL — which stands for absent without leave — or desertion, a more serious charge that carries a maximum five-year sentence.

Desertion requires prosecutors to prove that a servicemember intended to leave permanently or shirk hazardous or important duty. During World War II, desertion carried a death sentence.

To prove a soldier was AWOL, prosecutors need only show the soldier planned to be gone from duty temporarily.

If Bergdahl does end up going to trial, prosecutors might bring up deaths or injuries that occurred as a result of the search for the soldier once he fell into Taliban hands, said Philip Cave, a retired Navy judge advocate now in private practice. That could be considered aggravating circumstances, he said.