(CNN) Qatar has agreed to temporarily extend a travel ban for the five senior Taliban leaders who have lived there since being released in a prisoner exchange with the United States, a senior U.S. official told CNN.

The ban will stay in place while discussions between the United States, Qatar and Afghanistan continue for a long-term solution. The Taliban members, who were traded for Sgt. Bowe Bergdahl, will still not be able to travel and will be subject to monitoring, the official said.

The prisoner swap happened in May 2014.

Bergdahl, who was captured and held by the Taliban for five years, was charged with desertion in March and could face a life sentence.

"We are in close contact with our Qatari counterparts on this issue, and continue to work to make sure these individuals do not pose a threat to the United States, " a senior State Department official said. "The government of Qatar has agreed to maintain the current restrictive conditions on these individuals as we continue these discussions. All five remain in Qatar, where they remain subject to extensive monitoring as well as travel restrictions"

Read More