Updated

The U.S. military Wednesday charged Army Sgt. Bowe Bergdahl with deserting his post in Afghanistan less than a year after the White House defended him as a captured prisoner of war who served with “honor and distinction.”

“When somebody wears our country’s uniform and they’re in a war theater and they’re captured, we’re going to do everything we can to bring them home,” President Obama told NBC in June 2014.

Bergdahl disappeared from his post in Afghanistan in June 2009 and was captured by the Taliban and held for five years. He was returned to the United States in May 2014 in exchange for five Taliban detainees.

The deal was made amid widespread controversy over whether Bergdahl was captured or left his military unit on his own, as members of the unit had suggested.

The president’s comments last year also fueled a debate over whether the U.S. should have swapped a possible Army deserter and enemy sympathizer for five suspected terrorists who had the potential to return to the battlefield.

“This is something that I would do again, and I will continue to do wherever I have an opportunity, if I have a member of our military who’s in captivity,” Obama said at the time. “We’re going to try to get them out.”

Bergdahl was also charged with avoiding military service and misbehavior before the enemy.

A few days before Obama’s comments, then-National Security Adviser Susan Rice told ABC that Bergdahl “served the United States with honor and distinction.”