The entrance to Camp 5 and Camp 6 at the U.S. military’s Guantanamo Bay detention center, at Guantanamo Bay Naval Base, Cuba. (Ben Fox/AP)

Donald Trump’s inauguration on Friday elated and enraged Americans, as both supporters and detractors looked ahead to the changes the Republican leader’s presidency will bring. For a small group of foreign detainees locked in the military prison at Guantanamo Bay, Cuba, the start of the Trump era has a different sort of meaning: a narrowly missed chance for freedom.

The five men — an Algerian, a Moroccan, a Tunisian, a Yemeni, and an apparently stateless detainee — were all certified by Obama administration officials as eligible for resettlement overseas. But they did not form part of a final flurry of transfer deals sealed by the departing Obama administration. Now, as Trump declares that no additional prisoners should leave Guantánamo, it appears their long detentions may continue for at least another four years.

Trump assumes responsibility for a much more sparsely populated Guantánamo than former president Barack Obama did eight years ago. Following Obama’s resettlement of 196 prisoners overseas, only 41 inmates remain today, far fewer than the prison’s peak of over 700 under President George W. Bush. But Obama failed to accomplish his primary goal of shuttering the facility, unable to overcome political opposition to congressionally sanctioned steps, and unwilling to resort to executive action to make such a controversial move.

Trump, in contrast, has suggested he might put new prisoners in Guantánamo, and possibly use the facility to try Americans. In line with his administration’s day-one promise to defeat “radical Islamic terror groups,” Trump, like Republicans in Congress, believes prisoner resettlement undermines American security.

Like nearly all remaining prisoners, none of the five men now expected to be marooned at Guantánamo has been convicted of a crime.

Two of the men, an Algerian named Sufyian Barhoumi and Moroccan Abdul Latif Nasir, now face indefinite detention after the defeat of an 11th-hour court action aimed at securing their release.

Attorneys for the men, who were not included in a final set of notifications officials submitted to Congress regarding upcoming transfers. say their repatriation did not come together for reasons unrelated to their backgrounds or security profiles. The legal teams requested that judges waive steps required before transfers can take place, including a 30-day congressional notice period, to allow the men to be moved before Trump took office.

Last week, judges denied those requests.

According to prisoner profiles made public by WikiLeaks, Barhoumi, the Algerian, is believed to have lived in Europe before being arrested in Pakistan in 2002. The 43-year-old has been held at Guantánamo since June of that year. Nasir, 51, was captured in Afghanistan in late 2001 and held at an American detention center there before being brought to Guantánamo in May 2002.

Thomas A. Durkin, who represented Nasir, said that Morocco had complied with U.S. requirements regarding security guarantees for transferred prisoners. It had just been done so too late. For the court to deny the transfer was to leave his client in a “legal black hole,” Durkin argued in a filing this week.

“His whole life hangs in the balance due to a mere technicality that the courts and more importantly the Obama Justice Department didn’t have the courage to act on,” he said on Friday. He called the fact that Nasir and others would remain at Guantánamo despite having been deemed eligible for resettlement “disgraceful.”

Another of the five is Rida bin Saleh al Yazidi, a 51-year-old Tunisian who military officials believed lived in Italy and was later captured in Pakistan. He was taken to Guantánamo in Jan. 2002. Officials said they had identified a country that was willing to accept him, but Yazidi rejected a proposal to be resettled there.

Military officials alleged that Tawfiq Nisar al-Bihani, a 44-year-old Yemeni citizen, smuggled himself into Iran from Afghanistan in 2001, and was later captured by Iranian authorities. He was held by Afghan officials before being turned over the United States in 2002, and arrived at Guantánamo in February 2003. Former Defense Secretary Ashton B. Carter, who stepped down this week, did not support Bihari’s transfer due to security concerns, the officials said.

The final prisoner is a man of undetermined nationality named Muieen al-Din Jamal al-Din al-Sattar. According to U.S. officials, Sattar is a member of the Rohingya, a Bengali-speaking Muslim minority that lives in large numbers in Burma. While Sattar was born in the United Arab Emirates in 1974, he is considered stateless. Officials were unable to find a home for him, partly for that reason and partly because of foreign officials’ concerns about the threat Sattar might pose. He has been at Guantánamo since February 2002.

Many of the other detainees remaining at Guantánamo are expected to be held indefinitely without charges due to a lack of admissible evidence against them.

Wells Dixon, a senior staff attorney at the Center for Constitutional Rights (CCR), which represented the Algerian prisoner, said the Obama administration’s instinct to fight off legal challenges like the one about Barhoumi and Nasir was partly to blame for the fact the prison remains open.

He said the government’s rejection of the legal petition to free the two prisoners, just days before Trump took office and shut down future transfer options, meant the men “may remain stranded at Guantánamo forever.”