Barack ObamaBarack Hussein ObamaReport: FCC chair to push for complete repeal of net neutrality Right way and wrong way Keystone XL pipeline clears major hurdle despite recent leak 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 Sidney McCainTrump's dangerous Guantánamo fixation will fuel fire for terrorists Tech beefs up lobbying amid Russia scrutiny Ad encourages GOP senator to vote 'no' on tax bill 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."