The case for sending them to a secure but humane prison in the United States is that keeping them in Cuba, on balance, hurts U.S. interests. Guantanamo was established to be beyond the reach of U.S. law, a premise the Supreme Court rejected in Rasul v. Bush and Boumediene v. Bush. The facility is “a propaganda tool for our enemies and a distraction for our allies,” as former president George W. Bush said in a memoir in the course of explaining why his administration “worked to find a way to close the prison.” For similar reasons, closing Guantanamo remains high on Obama’s agenda.

There are no appealing solutions, but members of Congress who dispute the national security assessment of two commanders in chief should consider this: Transferring the detainees to the United States is an opportunity to strengthen the legal basis for their long-term detention, which becomes more fraught as the armed conflicts in Afghanistan and against some components of al-Qaeda wind down.

The legislation needed to bring Guantanamo detainees to the United States could supplement the military rationale for holding non-prosecutable — but very dangerous — terrorists with a form of administrative detention akin to civil commitment, one that could apply after the end of the relevant hostilities. Such a statute could prescribe the definition of dangerousness that warrants detention, the processes for determining a continued threat to public safety over time and the standards for judicial review.