The US soldier released by the Taliban after five years has told military officials he was tortured, beaten and held in a cage by his captors in Afghanistan after he tried to escape.

Sergeant Bowe Bergdahl is being treated at a US ­military medical facility in Germany following his release a week ago.

The New York Times has reported that Sgt Bergdahl is not yet emotionally prepared to return to his family.

His release in exchange for five Taliban militants from Guantanamo Bay prison has ignited a political firestorm and sparked a debate over whether the 28-year-old should be given a hero's welcome or punished as a deserter.

Some of Sgt Bergdahl's former comrades have alleged he was captured by the Taliban after deserting his post.

His home town abruptly cancelled plans for a welcome-home celebration on Wednesday, citing security concerns.

Hailey, Idaho, a town of 8000, has been swamped with hate mail and angry calls.

FBI spokesman William Facer said: "The FBI continues to monitor the situation in Hailey, Idaho.

"We are working jointly with our state and local partners and taking each threat seriously."

Mr Facer did not describe the nature of the threats.

Meanwhile, US Secretary of State John Kerry has said that if the five Taliban inmates released in exchange for Sgt Bergdahl were to rejoin the fight against the United States, they would do so at great risk.

"I'm not telling you they don't have some ability at some point to go back and get involved," Mr Kerry said in an interview with CNN's State of the Union programme. "But they also have the ability to get killed doing that. These guys pick a fight with us, in the future or now or at any time, at enormous risk."

Concern that the five former inmates might return to fight has been a factor in controversy in the US over the deal, under the terms of which Army Sergeant Bowe Bergdahl was handed over to US troops in Afghanistan on May 31.