A Pentagon investigation concluded in 2010 that Army Sergeant Bowe Bergdahl walked away from his unit, and after an initial flurry of searching the military decided not to exert extraordinary efforts to rescue him, according to a former senior defense official who was involved in the matter.
Instead, the US government pursued negotiations to get him back over the following five years of his captivity — a track that led to his release over the weekend.
Bergdahl was being checked and treated Monday at a US military hospital in Germany as questions mounted at home over the swap that resulted in his freedom in exchange for the release of five detainees who were sent to Qatar from the US prison at Guantanamo, Cuba.
Even in the first hours of Bergdahl's handoff to US special forces in eastern Afghanistan, it was clear this would not be an uncomplicated yellow-ribbon celebration.
Five terrorist suspects also walked free, stirring a debate over whether the exchange would heighten the risk of other Americans being snatched as bargaining chips and whether the released detainees — several senior Taliban figures among them — would find their way back to the fight.
US officials said that Bergdahl's health and safety appeared in jeopardy, prompting rapid action.
"Had we waited and lost him," said national security adviser Susan Rice, "I don't think anybody would have forgiven the United States government."
She said he had lost considerable weight and faced an "acute" situation. Yet she also said he appeared to be "in good physical condition."
One official, who spoke on grounds of anonymity because the person wasn't authorised to discuss the subject by name, said there were concerns about Bergdahl's mental and emotional as well as physical health.
A US military hospital in Germany later reported Bergdahl in "stable condition and receiving treatment for conditions requiring hospitalization" after arriving from Afghanistan.
The Landstuhl Regional Medical Center said Bergdahl's treatment "includes attention to dietary and nutrition needs after almost five years in captivity" but declined to release further details.
It said there "is no pre-determined amount of time involved in the reintegration process" for the 28-year-old soldier.
Two officials said Monday that the Taliban may have been concerned about his health, as well, since the US had sent the message that it would respond harshly if any harm befell him in captivity.
Republicans in the US said the deal for Bergdahl's release could set a troubling precedent. Arizona Sen. John McCain said of the Guantanamo detainees who were exchanged for him: "These are the hardest of the hard core."
And in Kabul Monday, the Afghan Foreign Ministry called the swap "against the norms of international law" if it came against the five imprisoned Taliban detainees' will. The ministry said: "No state can transfer another country's citizen to a third country and put restriction on their freedom."
Tireless campaigners for their son's freedom, Bob and Jani Bergdahl thanked all who were behind the effort to retrieve him.
"You were not left behind," Bob Bergdahl told reporters, as if speaking to his son. "We are so proud of the way this was carried out."
He spoke in Boise, Idaho, wearing a long bushy beard he'd grown to honor his son, as residents in the sergeant's hometown of Hailey prepared for a homecoming celebration.
The five detainees left Guantanamo aboard a U.S. military aircraft flying to Qatar, which served as go-between in the negotiations. They are to be banned from leaving Qatar for at least a year.
Among the five: a Taliban deputy intelligence minister, a former Taliban interior minister with ties to the late al-Qaida leader Osama bin Laden and a figure linked by human rights monitors to mass killings of Shiite Muslims in Afghanistan in 2000 and 2001.
Questions persisted, too, about the circumstances of Bergdahl's 2009 capture. Defense Secretary Chuck Hagel declined to comment on earlier reports that the sergeant had walked away from his unit, disillusioned with the war. Such matters "will be dealt with later," Hagel said.
But the former Pentagon official said it was "incontrovertible" that he walked away from his unit.
The military investigation was broader than a criminal inquiry, this official said, and it didn't formally accuse Bergdahl of desertion.
In interviews, members of his unit portrayed him as a naive, "delusional" person who thought he could help the Afghan people by leaving his army post, the official said.
US military and intelligence agencies had made every effort to monitor Bergdahl's location and his health, the official said, through both signals intelligence and a network of spies.
Nathan Bradley Bethea, who served as an officer in Bergdahl's unit, said in an article Monday on the Daily Beast website that Bergdahl was not on patrol, as some reports have suggested.
"There was no patrol that night," he wrote. "Bergdahl was relieved from guard duty, and instead of going to sleep, he fled the outpost on foot. He deserted.
I've talked to members of Bergdahl's platoon - including the last Americans to see him before his capture. I've reviewed the relevant documents. That's what happened."
Hagel, visiting troops in Afghanistan, was met with silence when he told a group of them in a Bagram Air Field hangar: "This is a happy day. We got one of our own back."
At the White House, press secretary Jay Carney said the exchange "was absolutely the right thing to do." in much the same tone as the president over the weekend, he said: "The United States does not leave our men and women behind in conflict."
"In a situation like this, you have a prisoner of war, a uniformed military person that was detained," Carney said.
In weighing the swap, US officials decided that it could help the effort to reach reconciliation with the Taliban, which the US sees as key to more security in Afghanistan. But they acknowledged the risk that the deal would embolden insurgents.
Republicans pressed that point. "Have we just put a price on other U.S. soldiers?" asked Senator Ted Cruz of Texas. "What does this tell terrorists, that if you capture a US soldier, you can trade that soldier for five terrorists?"