WASHINGTON — A senior U.S. official says Qatar has agreed to temporarily extend travel bans on five senior Taliban leaders released last year from the prison at Guantanamo Bay, Cuba, in exchange for Sgt. Bowe Bergdahl.

The official said Sunday the ban would remain in place until diplomatic talks for a longer-term solution are completed. The restrictions had been due to expire on Monday under a May 2014 exchange for Bergdahl. The official said the former detainees are all currently in Qatar and remain subject to the travel ban and extensive monitoring. The official spoke on condition of anonymity because he was not authorized to publicly speak to the matter.

U.S. officials said Friday the Obama administration was closing in on an agreement with Qatar to extend the restrictions for six months.