In 2008, when he joined the army, he was a bookish athlete from Idaho with a passion for fencing. A year later, he was a captive of the Afghan Taliban.
Today, he is on the way home, but a new ordeal for Sergeant Bowe Bergdahl, 28, is just beginning.
Held alone for nearly five years, without any contact with fellow soldiers, Bergdahl is likely to have suffered deep psychological scars that could take years to heal, say experts who have studied prisoners held for long periods at war.
"You start feeling an attachment to your captors akin to that of your mother. It's primordial," said Frank Ochberg, a psychiatrist who has worked with such veterans since the Vietnam war. "You have to ask permission to eat, to move, to sleep ..."
Bergdahl was freed on Saturday in a prisoner exchange for five Taliban members who had been held at the Guantanamo Bay prison.
Bergdahl's father said he admired his son's patience, perseverance and ability to adapt during nearly five years as a prisoner.
"But most of all, I'm proud of how much you wanted to help the Afghan people, and what you were willing to do to go to that length," Bob Bergdahl said, fighting back tears. "And I think you have succeeded."
Home-schooled by his parents in rural Hailey, a tiny town in mountainous central Idaho with just 8,000 inhabitants, Bowe Bergdahl was a loner who excelled at fencing and often disappeared on long hikes and bike rides, said Lee Ann Goddard Ferris, who lived next door to the family for 16 years.
"This is not unusual around here. Idaho breeds individuality and pioneer strength," she said.
He enlisted in 2008, without telling his parents, drawn by recruiters' promises that he would be able to go overseas to help people, according to a 2010 Rolling Stone magazine profile.
During time off from basic training in Georgia, when others went to strip clubs Bergdahl went to a book store and immersed himself in philosophy and Zen meditation, according to Rolling Stone.
But after he arrived in Afghanistan he appeared to become disillusioned about the United States' mission there. In his final e-mail to his parents before his capture, he wrote, "I am ashamed to even be an American," Rolling Stone reported.
After he was captured on June 30, 2009, many believed he willingly walked away from his post. According to US diplomatic cables, Bergdahl's unit began searching when he did not show up for roll call.
Later that day, US officials picked up radio communication between Taliban insurgents who said "an American soldier with a camera is looking for someone who speaks English", the cables said. Intelligence received three hours later indicated a US soldier had been captured.
"He left of his own volition," one defence official said. "But we have no idea of his motivation, or what was going through this young man's mind."
Ochberg said lingering questions of this kind could make Bergdahl's recovery more difficult. "He's going to have to contend with becoming a very public person in a very controversial atmosphere," he said.
Additional reporting by Associated Press