In two votes Friday morning, the House backed the president’s powers to indefinitely detain terror suspects captured on U.S. soil.

Lawmakers rejected an amendment that would have barred military detention for terror suspects captured in the United States on a 182-231 vote, beating back the proposal from a coalition of liberal Democrats and libertarian-leaning Republicans led by Reps. Adam Smith (D-Wash.) and Justin Amash (R-Mich.).

Instead, the House passed, by a vote of 243-173, an amendment to the National Defense Authorization Act (NDAA) sponsored by Reps. Louie Gohmert (R-Texas), Jeff Landry (R-La.) and Scott Rigell (R-Va.) that affirmed U.S. citizens would not be denied habeas corpus rights.

Smith and Amash had hoped to attract enough support from libertarian-leaning Republicans to pass their measure, but only 19 Republicans voted for it, while 19 Democrats voted against.