WASHINGTON/Doha - Sergeant Bowe Bergdahl, recently released after five years as a captive of the Taliban, may still be disciplined if the army finds evidence of misconduct, the US military's top officer said Tuesday

General Martin Dempsey, the chairman of the Joint Chiefs of Staff, was speaking after claims from members of Bergdahl's unit that he had been captured after abandoning his post.

The New York Times cited a former military official as saying Bergdahl slipped away from his base near the Afghan border with Pakistan, leaving a note saying he had become disillusioned with the army and the war and was going to start a new life. "Our army's leaders will not look away from misconduct if it occurred," Dempsey said.

The general stressed that Bergdahl, who was taken as a private and promoted while in captivity, was innocent until proven guilty, and that the military would continue to care for him and his family.

"The questions about this particular soldier's conduct are separate from our effort to recover ANY US service member in enemy captivity," Dempsey wrote in his statement. "This was likely the last, best opportunity to free him. As for the circumstances of his capture, when he is able to provide them, we'll learn the facts."

Meanwhile, President Barack Obama Tuesday defended a prisoner swap with the Taliban to free an American soldier, saying his "sacred" trust as commander-in-chief outweighed claims he broke the law and set a dangerous precedent.

"The United States has always had a pretty sacred rule. That is we don't leave our men or women in uniform behind," Obama said. "We saw an opportunity, we were concerned about Sergeant Bergdahl's health ... and we seized that opportunity," Obama said.

Meanwhile, Qatar has moved five Afghan Taliban prisoners freed in exchange for a US soldier to a residential compound and will let them move freely in the country, a senior Gulf official said on Tuesday, a step likely to be scrutinised by Washington.

US officials have referred to the release of the militants as a transfer and said they would be subject to certain restrictions in Qatar. One of the officials said that would include a minimum one-year ban on them travelling outside of Qatar as well as monitoring of their activities. "All five men received medical checks and they now live with their families in an accommodation facility in Doha," the Gulf source, who declined to be identified, told Reuters. "They can move around freely within the country."

Following the deal under which freed the last American soldier held in Afghanistan was freed, concerns have been expressed by some US intelligence officials and congressional advisers over the role of the Gulf Arab state as a bridge between Washington and the world of radicals. The Gulf official said the Taliban men, who have been granted Qatari residency permits, will not be treated like prisoners while in Doha and no US officials will be involved in monitoring their movement while in the country.

"Under the deal they have to stay in Qatar for a year and then they will be allowed to travel outside the country... They can go back to Afghanistan if they want to," the official said.

The five, who had been held at the US Guantanamo Bay prison in Cuba since 2002, arrived in Qatar on Sunday where US security personnel handed them over to Qatari authorities in the Al Udeid area west of Doha, site of a US military base.

US Army Sergeant Bowe Bergdahl had been held for nearly five years by Taliban insurgents in Afghanistan and his release followed years of on-off negotiations.

A diplomatic source said Qatar has flown in family members of the five released Taliban men and gave them accommodation paid for by the government.

On Sunday, Qatari Foreign Minister Khaled al-Attiyah told a news conference that Doha got involved in the case because it was a "humanitarian cause". He did not elaborate.