WASHINGTON (Reuters) - The U.S. Supreme Court on Monday turned away a Yemeni man’s bid for release after 17 years held as an enemy combatant at the American naval base at Guantanamo Bay, Cuba, even as a liberal justice urged the court to decide whether the United States can legally confine such detainees indefinitely.

Slideshow ( 5 images )

The nine justices decided not to hear an appeal by detainee Moath Hamza Ahmed al Alwi, who was captured in Pakistan in 2001 and placed in the Guantanamo U.S. military detention facility in 2002 without ever facing criminal charges. The U.S. government has said al Alwi was involved in fighting against U.S. and allied forces in Afghanistan and was closely linked with the Islamic militant group al Qaeda.

After the Sept. 11, 2001, attacks on the United States, the United States launched a long-running military campaign in Afghanistan targeting al Qaeda, which carried out the attacks, and the Taliban-led government that sheltered the group.

Justice Stephen Breyer, one of the court’s four liberals, issued a statement saying that the court should decide at some point “whether, in light of the duration and other aspects of the relevant conflict, Congress has authorized and the Constitution permits continued detention.”

Al Alwi “faces that real prospect that he will spend the rest of his life in detention based on his status as an enemy combatant a generation ago,” Breyer added.

One of the longest-serving Guantanamo detainees, al Alwi has previously gone on a hunger strike in protest, and he was one of a number of men held at the facility whose artwork including elaborate ship models made while incarcerated was put on display in New York in 2017.

Al Alwi, who was born in 1977 and is in his early 40s, has argued that he should be released in part because the U.S. conflict in Afghanistan has “effectively ended.” His lawyers have said that the authority of the United States to hold him has “unraveled” because of the length of the conflict. In a 2018 decision, the U.S. Court of Appeals for the District of Columbia Circuit rejected his claims.

“Everything Moath has done for the 17 years that he has languished without charge at Guantanamo - from this petition, to his earlier hunger strikes, to the virtuosic art he has produced in the face of government censorship - has been with the single aim of reaffirming his dignity in the face of injustice,” said his lawyer, Ramzi Kassem, a law professor at the City University of New York.

“Justice Breyer’s statement helps draw attention to that ongoing injustice and, hopefully, it brings Moath one step closer to its end,” Kassem added.

U.S. authority to hold al Alwi and other Guantanamo detainees is based on the 2001 authorization for use of military force approved by Congress in the aftermath of the Sept. 11 attacks.

In 2014, then-President Barack Obama declared an end to combat operations in Afghanistan, but the Justice Department said in court papers that “active hostilities continue.” Peace talks between the U.S. and the Taliban are ongoing.

The Supreme Court heard several Guantanamo cases soon after the conflict began, but the last ruling came in 2008. The court ruled then that detainees had a legal right to go before a judge to challenge the legality of their detention and seek their release. But the Supreme Court has repeatedly rejected subsequent appeals from detainees.

Al Alwi’s previous attempt to seek his release failed in lower courts.