A US soldier freed after five years in Taliban captivity walked away from his unit and US military decided not to exert extraordinary efforts to rescue him, a former Pentagon official has told the AP news agency.

The agency on Monday reported the unnamed official as saying that the US government instead pursued negotiations to get Bowe Bergdahl back, leading to his release on Saturday.

The official told AP that a Pentagon report in 2010 concluded that he had walked away from his post in Afghanistan before his capture by Taliban fighters.

The official said that members of his unit portrayed him as a naive, "delusional" person who thought he could help the Afghan people by leaving his army post.

However a military investigation did not formally accuse Bergdahl of desertion, the official said.

The 28-year-old from Idaho was on Saturday exchanged for five senior Taliban figures held by the US in Guantanamo Bay prison in a deal brokered by Qatar.

Disillusioned

Bowe 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 profile.

Once deployed to Afghanistan, he appeared to become disillusioned about the US military mission. In his final email 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, some believed he willingly walked away from his post. According to US diplomatic cables , Bergdahl's unit began searching for him that morning when he did not show up for roll call.

"He left of his own volition," one US defence official told the Reuters news agency, declining to be identified. "But we have no idea of his motivation, or what was going through this young man's mind at the time."

Asked whether Bergdahl should be disciplined, US national security adviser Susan Rice told ABC News on Sunday: "Anybody who's been held in those conditions in captivity for five years has paid an extraordinary price."

The comments came as some in the US began to question the swap of Bergdahl for five high-value Taliban prisoners.

John McCain, a leading Republican senator, said: "These are the highest high-risk people. Others that we have released have gone back into the fight."

Jay Carney, a White House spokesman, defended the decision. "We have a history in this country of making sure that our prisoners of war are returned to us - we don't leave them behind," he told CNN.

"The threat potentially posed by the returned detainees was sufficiently mitigated to allow us to move forward and get Bowe Bergdahl back home where he belongs."