WASHINGTON — A federal judge on Wednesday blocked the government from enforcing a controversial statute about the indefinite detention without trial of terrorism suspects. Congress enacted the measure last year as part of the National Defense Authorization Act.

The ruling came as the House voted to extend for five years a different statute, the FISA Amendments Act, that expanded the government’s power to conduct surveillance without warrants. Together, the developments made clear that the debate over the balance between national security and civil liberties is still unfolding 11 years after the terrorist attacks of Sept. 11.

In the detention case, Judge Katherine B. Forrest of the United States District Court for the Southern District of New York issued a permanent injunction barring the government from relying on the defense authorization law to hold people in indefinite military detention on suspicion that they “substantially supported” Al Qaeda or its allies — at least if they had no connection to the Sept. 11 attacks.

The United States has been detaining terrorism suspects indefinitely since 2001, relying on an authorization by Congress to use military force against perpetrators of the Sept. 11 attacks and those who helped them. Last year, Congress decided to create a federal statute that codified authority for such detentions.