The Supreme Court ruled today that Gitmo detainees have rights after all:

In a stunning blow to the Bush Administration in its war-on-terrorism policies, the Supreme Court ruled Thursday that foreign nationals held at Guantanamo Bay have a right to pursue habeas challenges to their detention. The Court, dividing 5-4, ruled that Congress had not validly taken away habeas rights. If Congress wishes to suspend habeas, it must do so only as the Constitution allows — when the country faces rebellion or invasion.

The Court stressed that it was not ruling that the detainees are entitled to be released — that is, entitled to have writs issued to end their confinement. That issue, it said, is left to the District Court judges who will be hearing the challenges. The Court also said that “we do not address whether the President has authority to detain” individuals during the war on terrorism, and hold them at the U.S. Naval base in Cuba; that, too, it said, is to be considered first by the District judges.

About time. Don’t miss Balkinization for insightful running commentary.

I’ll also say that the bottom line is that if John McCain is elected President, cases like this go the other way for a long, long time.

Update: Dahlia Lithwick has posted her analysis of the ruling.