Barack ObamaBarack ObamaDem senator: Trump's 'icky' Boy Scout speech left 'my stomach in knots' Boos for Obama as Trump speaks at Boy Scout jamboree Feehery: Winning August 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: 'So great' McCain is returning for healthcare vote McConnell to pin down colleagues on healthcare McCain returning to Senate in time for health vote 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."