In a 205-217 vote that created unusual political alliances in Washington, the U.S. House rejected an amendment to the defence appropriations bill, which would have blocked funding for the NSA's programme to collect electronic information, including details of every call made by or to a U.S. phone.
The House later approved the defence appropriations bill, which included nearly $600 billion in Pentagon spending for the 2014 fiscal year, including the costs of the Afghanistan war.
The NSA began collecting phone records in 2001, as part of far reaching surveillance programmes launched by then-President George W. Bush in the aftermath of the September 11 attacks.
But the scope of the programme, continued under President Barack Obama, only became apparent in June when former NSA contractor Edward Snowden leaked classified U.S. surveillance files. Snowden is now a fugitive from the United States and has been holed up at a Moscow airport for weeks after failing to secure asylum.
A number of Latin American states have offered the former intelligence systems analyst asylum, but Snowden first needs Russian asylum in order to be able to travel, since the U.S. has cancelled his passport.
Introducing the amendment, Michigan Republican Justin Amash warned during Wednesday’s debate that the proposal’s critics would “use the same tactic every government throughout history has used to justify its violation of rights: fear.”
“They’ll tell you that the government must violate the rights of the American people to protect us against those who hate our freedom,” he said.
Critics say the NSA’s data collection is an unwarranted invasion of privacy but its supporters argue that such surveillance has helped thwart at least 50 terror plots in 20 countries, including a dozen directed at the United States.