The House of Representatives narrowly defeated a proposal that would have seriously hampered the National Security Agency’s recently revealed efforts to collect telephone records from millions of Americans.

According to USA Today, the House voted down the proposal 217-205 in an incredibly close vote. The proposal, sponsored by Rep. Justin Amash (R-Mich.), would have limited spending on phone surveillance to court orders from the Foreign Intelligence Surveillance Court against those who are the subject of an investigation. Essentially, it would have completely defunded the NSA’s controversial programs to collect telephone metadata on domestic calls placed by Americans.

The proposal, which was backed by a coalition of libertarian-minded Republicans and Democrats who oppose the the NSA’s wide-ranging surveillance, went to the House floor as an amendment to a defense spending bill.

In advance of the House vote on Amash’s amendment, White House officials urged representatives to vote against the proposal, claiming it could seriously dismantle the administration’s goals on counterterrorism and national security.

“In light of the recent unauthorized disclosures, the President has said that he welcomes a debate about how best to simultaneously safeguard both our national security and the privacy of our citizens,” Press Secretary Jay Carney wrote on Tuesday night. “However, we oppose the current effort in the House to hastily dismantle one of our Intelligence Community’s counterterrorism tools.

“This blunt approach is not the product of an informed, open or deliberative process,” Carney said. “We urge the House to reject the Amash Amendment, and instead move forward with an approach that appropriately takes into account the need for a reasoned review of what tools can best secure the nation.”

In response, Amash tweeted that the Obama administration must be seriously afraid of the amendment to issue such a statement.

“When's the last time a president put out an emergency statement against an amendment?” he wrote around midnight on Wednesday. “The Washington elites fear liberty. They fear you.”

After the vote, Amash tweeted that he would continue to fight against the NSA’s surveillance programs.

“We came close,” Amash wrote soon after the bill was defeated on the House floor. “If just 7 Reps had switched their votes, we would have succeeded. Thank YOU for making a difference. We fight on.”