Guantanamo Bay detainees who have been held for as long as 16 years without being charged cannot be imprisoned indefinitely, attorneys argued in federal court Wednesday.

Speaking before U.S. District Judge Thomas Hogan in Washington, attorneys representing eight men detained at the military facility said the Trump administration had violated prisoners’ rights because it did not intend to try them or resettle them overseas.

Without court intervention, the lawyers argued, the government would allow the prisoners to die in detention without having a trial or being reunited with their families.

“There have to be some limits,” said Baher Azmy, legal director for the Center for Constitutional Rights, a group representing some of the detainees.

The case shines a light on the few remaining prisoners at Guantanamo, which President Trump has promised to keep open and potentially use to house new suspects, reversing his predecessor’s failed quest to shutter the facility.

The men’s collective challenge — joined by cases involving three other prisoners now before other judges — is a reminder of the unsettled questions that continue to surround the prison, which for critics symbolizes what they see as excesses that followed the attacks of Sept. 11, 2001.

At its peak, the military facility at Guantanamo Bay, Cuba, held more than 700 prisoners, most of whom were released long ago. After 2009, President Barack Obama, seeking to close the prison, resettled close to 200 more but was unable to overcome congressional opposition to shutting the prison.

Questions about Guantanamo have intensified as military commissions set up to handle 9/11 cases and other terrorism cases fail to reach conclusion. A handful of commission cases have inched along in pretrial proceedings for years, many of them plagued by irregularities.

Two of the men whose challenge was heard Wednesday, Tofiq Nasser Awad al-Bihani and Abdul Latif Nasser, have already been deemed eligible for resettlement overseas by a government panel, but they remain at Guantanamo.

Much of the hearing revolved around the government’s assertion that it could continue to hold the detainees until hostilities against the United States cease, no matter how long that takes.

Justice Department lawyer Ronald Wiltsie said authorities had a responsibility to detain suspects who could pose a future threat, even if it was not clear they would actually take any action against the United States.

Hogan asked Wiltsie whether that principle could be used to justify imprisonment stretching as long as the Hundred Years’ War between European nations in the 14th and 15th centuries. Wiltsie said it could.

“We could hold them for 100 years if the conflict lasted 100 years,” he said. “You cannot tell when hostilities end until they have ended.”

Baher said the government had distorted a 2001 law authorizing U.S. military operations against al-Qaeda and affiliated forces by using it as a basis for indefinite imprisonment.

He said insurgent wars, waged against small, clandestine and evolving bands of militants, could go on forever. But laws governing wars were devised with conflicts between states in mind, he said.

Wiltsie said the U.S. military was still “engaged against the compatriots” of the men held at Guantanamo, making reference to the ongoing U.S. operation against the Taliban and other militant groups in Afghanistan.

Although the Pentagon says that al-Qaeda has been largely defeated in Central and South Asia, officials believe that a small number of extremist holdouts remain in strongholds in Afghanistan and Pakistan and retain the ambition to strike the West.

Also at issue in court was the Trump administration’s position on detainee transfers. While attorneys for the men say the government’s apparent refusal to resume resettlements is an indication they intend to allow the men to die in prison, Wiltsie said the administration had not shut the door to future transfers.

Hogan challenged that assertion, saying that despite Trump’s 2018 executive order asking the Pentagon to develop a new transfer policy, the president had clearly stated his opposition to that idea in previous statements, in what Hogan characterized as his “Twitter position.”

The president’s Twitter statements on different matters have become an issue at times during legal proceedings.

Wiltsie said that despite the administration’s decision to close a State Department office overseeing detainee resettlement, prisoner transfers could resume at a later date.

Hogan, a 1982 Reagan appointee, formerly served as chief district judge and chairman of the executive committee for the U.S. Judicial Conference. In 2008, his colleagues selected him to lead the management of the Guantanamo detainee cases.

The judge expressed sympathy with the detainees’ long imprisonment, but he questioned whether it was his court’s place to overturn the rulings of higher courts. He did not say how he would rule.

Spencer Hsu contributed to this report