There was a landmark ruling from the Supreme Court yesterday that will have a huge impact on combatting terrorism, the fate of America's prison camp at Guantanamo Bay, Cuba, the race for the White House and the United States' standing in the world.

But there was an even broader message in yesterday's 5-4 decision on the rights of foreign prisoners detained at Gitmo:

It was the beginning of the end of the presidency of George W. Bush.

The case is called Boumediene v. Bush - Lahkdar Boumediene is one of six Algerians arrested in Bosnia after Sept. 11, 2001, and accused of plotting attacks against Americans - but it could have as easily been called U.S. Constitution v. Bush. Either way, Bush lost.

"The laws and Constitution are designed to survive, and remain in force, in extraordinary times," wrote moderate Justice Anthony Kennedy, the swing vote who decided the Guantanamo case and wrote the majority opinion. "Liberty and security can be reconciled; and in our system they are reconciled within the framework of the law."

So what does it all mean? Here's a quick primer:

Q. What's the case all about?

A. There are some 270 foreign nationals who've been picked up around the world and detained by the United States on suspicion of terrorism in the weeks after the 9/11 attacks who are now held at Guantanamo Bay, a U.S. military base.

The detainees have been handled outside of the U.S. justice system, and only a handful have even had access to military proceedings during that long period. Lawyers for about 200 of the detainees have sought what are known as habeas corpus hearings in American courts, but these were blocked by laws passed by Congress and signed by Bush in 2005 and 2006.

Yesterday's ruling reverses that and allows the detainees to now challenge their status through hearings in federal court.

Q. What is habeas corpus, anyway?

A. Latin for "you [should] have the body." It's a legal principle in which individuals can't be rounded up and detained without the chance to appear before a judge and have specific charges made against them.

The principle is a standard in British law as far back as the 12th century. The Constitution says habeas corpus can't be suspended "unless when in cases of rebellion or invasion, the public safety may require it" - the clause invoked by Abraham Lincoln during the Civil War.

Whether the Bush-declared "war on terror" rises to that level was one of the issues before the high court yesterday.

Q. Is this the end of the Guantanamo terror-detention camp?

A. In the long run, almost certainly yes. Both major presidential candidates have pledged broadly that they will begin to close Gitmo after the winner takes office in January, and the pending court hearings could speed up that process as some of the 270 are sent to other countries or released.

"I think in some ways this is the death knell for Guantanamo," Michael Ratner, president of the Center for Constitutional Rights, said in an interview. The center supports habeas corpus cases.

Some experts believe that as few as 60 to 80 of the detainees will ultimately face terrorism charges, and Ratner said there may be a speedier push to deport or even simply release the rest - especially those who allege they were tortured or mistreated.

Q. What about the suspected 9/11 terrorists like Khalid Shaikh Mohammed?

A. Mohammed is one if 19 Guantanamo prisoners currently charged with war crimes and facing a trial before a military tribunal. Those trials are still slated for this fall, although some experts say yesterday's ruling could provide these 19 with new avenues for legal challenges.

Q. Is everyone happy with the ruling?

A. Not dissenting Justice Antonin Scalia - who said the ruling "will almost certainly cause more Americans to be killed. The nation will live to regret what the court has done today."

Q. What about the presidential candidates?

A. Democratic Sen. Barack Oba-ma hailed the decision as "a rejection of the Bush administration's attempt to create a legal black hole at Guantanamo" but GOP Sen. John McCain said that while he also wants Gitmo closed, he still opposes allowing the inmates to challenge their detention. *