Presumed U.S. Republican presidential nominee John McCain says Thursday's U.S. Supreme Court ruling on detainees at Guantanamo Bay is one of the worst in American history.

McCain said at a town hall meeting Friday in the U.S. state of New Jersey that detainees at Guantanamo are enemy combatants, and thus do not get the same rights as U.S. citizens.

He said the ruling will lead to many lawsuits against the government.

McCain's Democratic rival, Barack Obama, praised the Supreme Court ruling. In a statement after the ruling was announced, he said the decision ensures that U.S. officials can protect the country and bring terrorists to justice, while also protecting core American values.

Obama also said the ruling is an important step toward re-establishing the credibility of the United States as a nation committed to the rule of law.