WASHINGTON (AP) — In another challenge to President Barack Obama’s efforts to close the Guantanamo Bay prison, a ban on transferring detainees to Yemen has been effectively pushed back into place because of security concerns in the volatile Middle Eastern nation, administration officials say.

While Obama approved sending detainees back to Yemen nearly two years ago, his administration has yet to use that authority. And officials say deep concerns about the threat posed by a Yemeni-based al-Qaida offshoot have removed that option for the foreseeable future, although that could change if conditions improve. The officials described the stance on condition of anonymity without authority to speak on the record.

Obama insisted in his State of the Union address Tuesday that he will not relent in his determination to close Guantanamo before he leaves office, and the administration is working on agreements with third countries willing to take Yemenis who are clear to leave the U.S. prison in Cuba. Nearly two-thirds of the remaining 122 detainees are from Yemen, including 47 of the 54 who have been approved for transfer.

Yemen has been gripped by a violent power struggle, with Shiite rebels taking President Abed Rabbo Mansour Hadi prisoner in his own home this week. Yemen’s state news agency reported late Wednesday that rebels reached a deal with the U.S.-backed Hadi to end the standoff, but questions remain about who really controls the country.

Meanwhile, al-Qaida in the Arabian Peninsula, which Washington considers to be the group’s most dangerous branch, has been thriving in Yemen amid the chaos. The group has claimed responsibility for the recent attack on the French satirical newspaper Charlie Hebdo and failed assaults on the U.S. homeland. While U.S. officials have questioned how much control the group had of the Paris operation, the United States has long been waging drone strikes in Yemen to target the terrorist threat.

Republican senators introduced legislation last week, citing the Paris and other terrorist attacks, as a reason to legally reinstate a ban on Yemeni transfers among other restrictions on Guantanamo transfers during Obama’s remaining two years in office.

“The last thing we should be doing is transferring detainees from Guantanamo to a country like Yemen,” New Hampshire Republican Sen. Kelly Ayotte said in a news conference to announce the bill. “We have not received assurances from the administration that they will not seek to transfer anyone to Yemen, despite the wild, wild West nature of what we’re facing when it comes to terrorism in Yemen.”

Administration officials say even if they will not send detainees to Yemen now, Obama will not officially reinstate the ban to maintain flexibility in case conditions improve. The officials say he does not want any further restrictions on his ability to close Guantanamo with so little time left to meet his goal of shuttering it.

Obama suspended transfers to Yemen in January 2010 after a Nigerian man attempted to blow up a U.S.-bound flight on Christmas Day 2009 with explosives hidden in his underwear on instructions from al-Qaida operatives in Yemen. But in May 2013, the president announced a renewed effort to close the prison after being blocked by Congress in his first term.

“I am lifting the moratorium on detainee transfers to Yemen so we can review them on a case-by-case basis,” Obama said in a speech at National Defense University.

At the time administration officials cited Hadi’s cooperation in the terrorist fight as reason for hope that the country would be an acceptable place to send detainees. Yemen agreed to open a rehabilitation center for former detainees, but it hasn’t been established. Still, in August, the U.S. returned to Yemen two prisoners who had been held at the Bagram prison in Afghanistan.

The strategy for Guantanamo detainees is to find other nations where administration officials have confidence they can be reintegrated into society without posing a new threat. A dozen Yemenis have been sent to third countries since November, including last week’s transfer of five to Oman and Estonia.

“While our policy preference is to repatriate detainees where we can do so consistent with our national security and humane treatment policies, we recognize that under certain circumstances the most viable transfer option is resettlement in a third country,” said Ian Moss, who works on detainee transfers at the State Department. “We are actively working to identify appropriate transfer locations for every single detainee approved for transfer and it may be the case that resettlement in a third country is the best option.”

___

Follow Nedra Pickler on Twitter at https://twitter.com/nedrapickler