WASHINGTON - A federal judge put a hold yesterday on his groundbreaking order allowing detainees at a U.S. air base in Afghanistan access to U.S. courts until an appeals court can rule on the case involving prisoners in an active war zone.

U.S. District Judge John Bates ruled April 2 that some foreign detainees at Bagram Airfield could use U.S. courts to challenge their detention. The Obama administration, in arguments similar to those made by the Bush White House, challenged the order.

Bates' order was the first time a judge extended rights given to terror suspects at Guantanamo Bay, Cuba, to detainees elsewhere in the world. Congressional Republicans had said Bates was endangering national security.

Bates said yesterday that he believed his order was correct. But he agreed to delay it long enough for the Obama administration to appeal.

Bates' initial ruling came in the case of four prisoners held at Bagram six years or more. He said three of them - non-Afghans captured outside the country - should have access to the courts to prevent the United States from being able to "move detainees physically beyond the reach of the Constitution and detain them indefinitely."

Bates had reserved judgment on the fourth detainee, Haji Wazir, because he is an Afghan citizen.

The government said releasing enemy combatants into the Afghan war zone, or even diverting U.S. personnel there to consider their legal cases, could threaten security. It also said that if the Bagram detainees got access to the courts, that would allow all foreigners captured by the United States in conflicts worldwide to do the same.