A car drives past yellow balloons and a sign of support for U.S. Army Sergeant Bowe Bergdahl in Hailey, Idaho June 1, 2014. Reuters

The U.S. Army announced Wednesday that it would bring charges against Sgt. Bowe Bergdahl, who was held captive by the Taliban for five years after leaving his base in remote Afghanistan. Bergdahl was charged with desertion and misbehavior before the enemy.

Bergdahl allegedly walked off his base in Afghanistan on June 30, 2009 without his armor and weapons. He was carrying just a backpack, water, knives and a notebook when he was captured by the Taliban. He was recovered five years later when U.S. special forces in Afghanistan exchanged him in 2014 for five top Taliban commanders who were imprisoned at Guantanamo Bay, Cuba. Soldiers who served with Bergdahl opposed the prisoner swap, saying the search for Bergdahl put other troops at risk.

What Is Desertion And How Common Is It?

Desertion is defined as leaving your place of duty with the intent to never return. It differs from going AWOL, or absent without leave. The U.S. Army has prosecuted about 1,900 cases of desertion since 2001, but more than 20,000 soldiers fled service during that time to avoid deadly combat, long and multiple deployments in Iraq and Afghanistan, and lost time with family, the Associated Press reported.

Former Army lawyer Greg Rinckey said desertion is easy to prove. "A lot of deserters suffered from PTSD or other mental health issues, or they were on their second or third deployment," Rinckey told the AP.

Could Bergdahl Serve Prison Time If Convicted?

Of the cases that went to trial, nearly half of the soldiers pleaded guilty. Nearly 100 soldiers were convicted of desertion. Possible penalties include counseling, a reprimand, forfeiture of pay, reduction in rank or involuntary separation from the military. The maximum punishment for desertion during a time of war is death, but that has only been carried out once since the Civil War when Pvt. Eddie Slovik, 24, was shot by a firing squad in January 1945.

Bergdahl will likely not face prison time. "At any stage he could offer to plead to a lesser charge," Gary Barthel, a former Marine Corps lawyer, told USA Today.

Last month, a U.S. Marine who vanished in 2004 in Iraq was sentenced to two years in prison for leaving his post. Cpl. Wassef Hassoun was given two years and five days' confinement. Prosecutors said he disapproved of how U.S. servicemen treated Iraqis during interrogations, according to CBS News.

In February 2014, Kevin Shakely of Sacramento pleaded guilty to abandoning his military post and was sentenced by an Army judge to a year in jail on charges including desertion. Army records show he enlisted in January 2004, completed his initial training to become an armor crewman and then deserted six days after arriving at Fort Lewis in Washington.

In October 2014, Matthew Brumer, 28, was arrested on a federal warrant of desertion from the Army. He had been stationed at Fort Knox in Kentucky.