In his final State of the Union address this year, President Obama repeated his call to close the detention facility at Guantanamo Bay, Cuba. “I will keep working to shut down the prison at Guantanamo. It is expensive, it is unnecessary, and it only serves as a recruitment brochure for our enemies,” he said. But as Obama’s presidency comes to its end, he has fallen short of that goal.

The prison, which is located in southeastern Cuba, opened under President George W. Bush’s administration as part of his war on terror. Over time, it has held 780 detainees. In 2006, Bush expressed a desire to shut down the detention center, which has been criticized for its interrogation methods. Calls for closing the prison increased during the 2008 election between John McCain and Barack Obama. Obama in particular made the closure of the facility a central tenet of his campaign. But officials warned then that pledges to shut down the detention center would be difficult to fulfill.

Those warnings proved accurate. Obama has repeatedly pushed plans to close the prison, without much success. This year, he sent a plan to Congress outlining where the remaining detainees could be transferred. He argued that keeping the prison in operation “is contrary to our values.” Congressional Republicans quickly denounced the effort. And this week, The New York Times reported that the Obama administration “intends to transfer 17 or 18 Guantanamo detainees.” If the plan is executed as intended, only 41 or 42 inmates will remain at the detention center. But the number falls short of what Obama had hoped when he first came into office.  

In January 2009, Obama issued an executive order to shutter the prison within a year. He also signed a memo later that year calling for a prison in Illinois to take in detainees. The administration appeared confident in its efforts. But it soon faced opposition from Congress, which passed legislation banning the transfer of detainees to the United States. The restriction required the administration to look abroad. Daniel Fried, who filled the role of Special Envoy for Closure of Guantanamo, was tasked with helping “lead the transfer process, in which State’s role was to find other countries willing to take detainees and then work with Defense and other agencies to make sure that the security arrangements were adequate.” The New Yorker has more on the negotiations:

The negotiations were often difficult. Moazzam Begg, a British Pakistani and a former Guantánamo prisoner who advocated for his peers, said that, if there were colonies on the moon, “I’m sure they’d send us there.” Leaked State Department cables show that most cases required both diplomatic pressure and financial bargaining. Bulgaria asked the U.S. to pay relocation expenses, and to dispense with visa requirements for Bulgarian tourists and businessmen. Yemen offered to build a rehabilitation center if the U.S. and its allies contributed eleven million dollars; the U.S. countered with half a million. Fried asked Germany to take nine detainees and was rejected repeatedly; finally, after Clinton stepped in, officials there consented to take two.

The president has had to contend with these and other complexities. Last year, when asked what advice he’d give himself if he could go back to the beginning of his presidency, Obama said, “I would’ve closed Guantanamo on the first day.” He added: “The politics got tough, and people got scared by the rhetoric around it … The path of least resistance was to leave it open, even though it’s not who we are as a country.”

Today, there are 59 detainees currently being held at Guantanamo Bay, according to a New York Times database. Of those, 22 have been recommended for transfer, while 27 are being held indefinitely and are not recommended for transfer.

Americans are largely split on the detention center. A CNN/ORC poll released in March found that 56 percent of Americans oppose Obama’s plans to shut down Guantanamo Bay, compared to 40 percent who favor its closure.

There’s no indication that the Trump administration will continue efforts to close the prison. Trump told the Miami Herald in August that he doesn’t agree with the current administration’s release of detainees. “I want to make sure, 100 percent sure, that if we’re going to release people, No. 1 they are going to be people that can be released and it’s going to be safe to release them. We have plenty of bad ones out there, and I would use it for that.” During his presidential campaign, Trump also pledged to “load it up with some bad dudes.”

Still, with less than a month left in his presidency, Obama is seemingly moving forward with efforts to transfer as many of the remaining inmates at Guantanamo Bay as he can—even as hope of closing it altogether fades.