A federal appeals court in Washington delivered a terse message on Friday to five Chinese ethnic Uighurs long held at the terror prison camp at Guantanamo Bay: Accept the US offer to resettle in a third country or stay at Guantánamo.

In a five-page ruling, the appeals court panel said that each of the five Uighur detainees had received and rejected three offers of resettlement from countries the government had deemed appropriate. Instead, the detainees pursued litigation seeking their transfer to the United States.

A federal judge had earlier ruled that the Uighurs could not be lawfully held at Guantánamo as enemy combatants. When government efforts to find suitable countries for resettlement bogged down, the judge ordered the government to bring the Uighurs to the United States, pending their resettlement.

The government responded by appealing that decision and by continuing efforts to find third countries willing to take in the Uighurs. Twelve of the original 17 Uighurs have been resettled. Lawyers for the remaining five were hoping the courts would intervene on behalf of their clients who have spent nearly a decade at Guantánamo.

Last fall, the Supreme Court agreed to take up the Uighurs’ case to examine whether a federal judge has the power to order the government to bring Guantánamo detainees to the US as a temporary remedy for their illegal detention at the terror prison camp.

In the meantime, the US government stepped up efforts to resettle the men. As oral argument at the Supreme Court approached, the government informed the justices of substantial progress on the resettlement front. Rather than hear the case, the high court vacated an earlier ruling and sent the issue back to the federal appeals court to consider in light of “new developments.”

Those new developments involved the fact that all of the Uighurs had been offered resettlement opportunities outside Guantánamo.

As Judge Judith Rogers said in a concurring opinion on Friday: “Petitioners hold the keys to their release from Guantánamo: All they must do is register their consent.”

Lawyers for the Uighurs had urged the appeals court to send the case back to the district court judge for a hearing to determine whether the government’s resettlement offers were “appropriate.”

The appeals court rejected the idea. The judges said: “Even if petitioners had good reason to reject the offers they would have no right to be released into the United States.”

In reinstating its 2009 opinion, the appeals court panel said it was within the exclusive power of the political branches to decide which foreign nationals may or may not enter the US. “At the time of our decision we heard only from the executive branch. Since then, the legislative branch has spoken,” the court said. “In seven separate enactments – five of which remain in force today – Congress has prohibited the expenditure of any funds to bring any Guantanamo detainee to the United States.”

Lawyers for the Uighurs had argued that such statutes violate the Constitution by effectively suspending the ability of prisoners to challenge the legality of their detention under the principle of habeas corpus. The court replied that “the statutes suspend nothing” because the Uighurs “never had a constitutional right to be brought to this country and released.”

Officials with the Constitution Project, who have been monitoring the litigation, said they were disappointed with the decision. The five Uighurs should have been given an opportunity to prove in court that they have not yet received an appropriate resettlement offer, said Sharon Bradford Franklin, senior counsel at the Constitution Project. She said denial of the court hearing was also a denial of an effective remedy for the Uighurs’ “unlawful detentions.”

“We are also disturbed by the court’s decision to reinstate its broad earlier decision,” Ms. Franklin said. “The court could have decided the case on narrower grounds based upon the recent resettlement offers, rather than unnecessarily, and in our view wrongfully, holding that courts lack the power to order release in the United States as a remedy for unlawful detention,” she said.