Qatar has agreed to extend monitoring and travel restrictions on five Taliban detainees who were freed from the Guantanamo Bay US detention camp last year in exchange for a US soldier, a senior US state department official said.

The official, who asked not to be identified, said on Sunday that the restrictions would continue while the US was in discussions with Qatar about ensuring the five posed no threat to US security.

Qatar took in the men as part of a deal to free US Sergeant Bowe Bergdahl, who had been captured by fighters in Afghanistan.

A Qatari agreement on supervision of the ex-detainees had been due to expire on Monday.

"The government of Qatar has agreed to maintain the current restrictive conditions on these individuals as we continue these discussions," the official said.

"All five remain in Qatar, where they remain subject to extensive monitoring as well as travel restrictions.”

Under the terms of the exchange, the five detainees were sent to Qatar, where government officials agreed to monitor their activities and prevent them from travelling out of the country for one year.

In return, Bergdahl, who had been held captive by the Taliban for nearly five years after walking away from his army post in Afghanistan, was released to the US military.

He was charged with desertion in March and could face a life sentence.