The House voted Wednesday to continue the collection of hundreds of millions of Americans' phone records in the fight against terrorism.
The House rejected a measure to end the program's authority. The vote was 217-205.
Republican Rep. Justin Amash of Michigan had challenged the National Security Agency program as an indiscriminate collection of phone records. His measure, if approved by the full House and Senate and signed by the president, would have ended the program's statutory authority.
The White House, national security experts in Congress and the Republican establishment had lobbied hard against Amash's effort. Libertarian-leaning conservatives and some liberal Democrats had backed it.
Amash's measure, offered as an addition to a $598.3 billion defense spending bill for 2014, would have canceled the statutory authority for the NSA program, ending the agency's ability to collect phone records and metadata under the USA Patriot Act unless it identified an individual under investigation.
Amash stepped up the pressure on rank-and-file colleagues, looking ahead to meetings with constituents during next month's congressional break.
"As you go home for August recess, you will be asked: Did you oppose the suspicionless collection of every American's phone records? When you had the chance to stand up for Americans' privacy, did you?" the Michigan Republican asked in a statement pleading for support for his measure.
Since the Sept. 11, 2001, attacks, Congress has authorized -- and a Republican and a Democratic president have signed -- an extension of the powers to search records and conduct roving wiretaps in pursuit of terrorists.
Two years ago, in a strong bipartisan statement, the Senate voted 72-23 to renew the Patriot Act, and the House backed the extension 250-153.
Since the disclosures this year, however, lawmakers have said they were shocked by the scope of the two programs -- one to collect records of hundreds of millions of calls and the other allowing the NSA to sweep up Internet usage data from around the world that goes through nine major U.S.-based providers.
"We've really gone overboard on the security side," said Rep. Peter Welch (D-Vt.), who argued that the "vast surveillance grab" has come at the expense of Americans' constitutional rights to privacy.