Image copyright Reuters

Sgt Bowe Bergdahl, who went missing from his US Army base in Afghanistan in 2009, has been charged with desertion and misbehaviour.

A hearing will determine whether he will have court-martial proceedings. He could then be sentenced to life in prison if found guilty.

Sgt Bergdahl was freed in May after five years of captivity by the Taliban.

His release - the product of a controversial prisoner swap - sparked a heated political row.

The US Army made the announcement at US Army Forces Command in Fort Bragg, North Carolina on Wednesday

Colonel Daniel King said the US Army Forces Command had reviewed the Army's investigation into Sgt Bergdahl's disappearance before bringing the charges.

Col King said Sgt Bergdahl has been charged with one count of desertion with intent to shirk important or hazardous duty and one count of misbehaviour before the enemy by endangering the safety of a command, unit or place.

Sgt Bergdahl could spend up to five years in prison if convicted on the desertion charge. A conviction on the misbehaviour charge carries a maximum sentence of life imprisonment.

Image copyright Getty Images Image caption A sign celebrated Sgt Bergdahl's release outside the coffee shop where he worked as a teenager

The case will now go to a preliminary hearing to determine whether he should face a court-martial. Col King likened the hearing to a civilian grand jury proceeding.

The timing for the hearing has not been announced.

Fellow soldiers said Sgt Bergdahl knowingly wandered away from his unit while deployed in Afghanistan in June 2009.

Image copyright AP Image caption Sgt Bergdahl was handed to US Special Forces in May 2014

He was captured and held by the Taliban for five years, before being handed over to a team of US special forces soldiers last May.

In exchange for his release, five senior Taliban commanders held at Guantanamo Bay were transferred to the custody of the Gulf state of Qatar, which brokered the deal.

His release enraged Republicans and some Democrats, who said that the prisoner swap could ultimately put American lives at risk.

Top Congressional Republicans argued the deal violated US law and amounted to negotiating with terrorists - accusations denied by the Obama administration. They also objected to the fact Congress was not given notice of the deal.

His family has received death threats and a welcoming party in his hometown in the state of Idaho was cancelled amid safety concerns.