Barack ObamaBarack ObamaPoll: More than 6 in 10 oppose ObamaCare repeal Jake Tapper falls — no, leaps — into Trump’s trap Perez: Trump's proposed budget cuts ‘a disaster’ MORE applauded the 5-4 U.S. Supreme Court decision Thursday establishing that prisoners in Guantanamo Bay have the right to challenge their detention in civilian courts.

Obama attacked John McCainJohn McCainTrump fires opening salvo in budget wars Overnight Finance: Trump budget to boost military, slash nondefense spending | Senate confirms Commerce pick | House Intel chief won't subpoena tax returns Overnight Defense: Trump proposes 3B defense budget | Defense hawks say proposal falls short | Pentagon to probe Yemen raid MORE for supporting the "failed policy" of creating a "legal black hole" enacted by the Bush Administration.

"This is an important step toward reestablishing our credibility as a nation committed to the rule of law, and rejecting a false choice between fighting terrorism and respecting habeas corpus," Obama said.

"The fact is, this Administration's position is not tough on terrorism, and it undermines the very values that we are fighting to defend. Bringing these detainees to justice is too important for us to rely on a flawed system that has failed to convict anyone of a terrorist act since the 9-11 attacks, and compromised our core values."