Speaking of the Guantanamo Bay detention facility in his May 23 national-security speech, President Obama said: "I know the politics are hard. But history will cast a harsh judgment on this aspect of our fight against terrorism, and those of us who fail to end it. Imagine a future ­— 10 years from now, or 20 years from now — when the United States of America is still holding people who have been charged with no crime on a piece of land that is not a part of our country. Look at the current situation, where we are force-feeding detainees who are holding a hunger strike. Is that who we are? Is that something that our founders foresaw? Is that the America we want to leave to our children?"

No, it is not, and it's time for a bipartisan solution to this complex problem.

First, a key differentiation: "Guantanamo" is a facility. It can, and should, be closed. Instead of enhancing national security, Guantanamo may actually make us less safe, because it's a global symbol of injustice that alienates allies and is exploited as a recruitment tool by terrorists.

Yet even if the costly (nearing $1 million annually per prisoner) facility is closed, the more vexing issue of what to do with the detainees remains.

First, the Obama administration needs to heed the call of 20 rights organizations, including the Minnesota-based Center for Victims of Torture, to apply the World Medical Association's guidelines on hunger strikes and stop force-feeding competent prisoners.

Next, Obama and Congress need to decide what to do with the remaining 166 detainees. They can be broadly categorized in three groups: About 86 are considered safe to send home to their original countries or other third-party nations, as long as governments there can monitor them. A second, smaller group are suspected terrorists who may be charged with specific crimes. The third group, estimated to be about 46, is more dangerous and difficult to deal with. They are considered direct threats, but cannot be brought to trial, either because there isn't enough evidence, or the evidence that exists is tainted because of torture, or other reasons.

Obama has latitude to deal with the first group, and he announced welcome steps in his speech. He has lifted the moratorium on detainee transfers to Yemen. This is crucial, because about 56 of the first group of 86 are Yemenis. While Yemen is still undergoing a difficult post-Arab Spring political transition, the Obama administration apparently has enough confidence returnees can be monitored.

Obama also announced that he would appoint new envoys at both the State Department and Defense Department who will be tasked with transferring other detainees to third-party countries.

In order to close Guantanamo, Obama wants to move some detainees to U.S. facilities and try them in U.S. courts or through the military justice system. But Obama needs congressional cooperation. Reluctant representatives and senators should realize that reflexively blocking Obama is an unsophisticated response to a complex problem, and that endless detention only inflames extremism.

Obama has not offered any clear recommendations for the third group, other than saying, "Once we commit to a process of closing Guantanamo, I am confident that this legacy problem can be resolved, consistent with our commitment to the rule of law."

He'll need more than confidence — he'll need Congress on this, too. It's a legal, moral and political problem that will need to be addressed, according to David Wippman, dean of the Law School at the University of Minnesota.

"The law of war historically said that if you capture an enemy combatant, you can hold that individual until hostilities come to an end, and then you can repatriate that individual to his or her country," Wippman said. "It's problematic to consider this an ongoing armed conflict. But the further we get away from the events of 2001 and the war in Afghanistan, it becomes harder to justify just holding them in effect as individuals incarcerated under the laws of war. That's where the administration is really stymied — what do you do with that group?"

Wippman added that, "Political realities are such that it's almost impossible to release them if they believe there is a significant risk that they are going to continue to attack Americans. But legally it's hard to justify detaining people indefinitely without charging them with a crime."

That's true, and justification will only get harder as time transpires. So it is in America's national-security interests that the best legal and political minds coalesce around a solution that reflects the country's values.

In the interim, Obama and Congress should implement the changes they can more immediately effect.