A federal judge upheld the Bush administration's new terrorism law Wednesday, agreeing that Guantanamo Bay detainees do not have the right to challenge their imprisonment in U.S. courts.

The ruling by U.S. District Judge James Robertson rejects a legal challenge by Salim Ahmed Hamdan, a former driver for Usama bin Laden whose case prompted the Supreme Court to strike down the Bush administration's policy on detainees last year.

Following that ruling, Bush pushed for and got a new law that established military commissions to try enemy combatants and stripped them of the right to seek their freedom in U.S. courts.

Robertson said Congress clearly intended to keep cases such as Hamdan's out of federal courts and, because of that, he no longer has jurisdiction to hear it.

The ruling is a legal victory for the Bush administration, which has been fending off criticism of the new law from Democrats and civil libertarians.

The ruling does not affect the fate of hundred of detainees whose cases are awaiting a ruling by a Washington appeals court, which is reviewing two precedent-setting detainee cases challenging the new law.