WASHINGTON -- The House of Representatives on Wednesday evening narrowly defeated an amendment from Rep. Justin Amash (R-Mich.) meant to halt the National Security Agency's bulk collection of phone record data.

"We're here today for a very simple reason: to defend the Fourth Amendment, to defend the privacy of each and every American," Amash said as he introduced his measure. Lawmakers' votes, he said, would answer one simple question, "Do we oppose the suspicionless collection of every American's phone records?"

On Wednesday, at least, the answer was no. The House voted 217-205 to defeat the amendment after intense last-minute lobbying from the White House and the NSA.

Democrats voted for the amendment by a 111-to-83 margin. Republicans, meanwhile, split 134 to 93 against it.

The closeness of the vote, the first on the surveillance programs since the revelations of NSA leaker Edward Snowden, gave civil liberties groups like the American Civil Liberties Union, which has been a vigorous critic of that surveillance, some reason for optimism that future reforms will be possible.

Amash's measure, offered as an amendment to the Department of Defense appropriations bill, would have prevented the government from invoking Section 215 of the Patriot Act to scoop up phone call metadata -- information about whom people are calling and when, but not the content of the calls -- unless the government had a reasonable suspicion that a specific target was involved in terrorism.

While the bill was co-sponsored by liberals, including Rep. John Conyers (D-Mich.), Amash warned that "opponents of this amendment will use the same tactic that every government throughout history has used to justify its violation of rights: fear." And the measure's foes -- even those within his own party -- did not disappoint.

Arguing that phone records collection helps protect a "nation under siege," Rep. Mike Rogers (R-Mich.), chairman of the House Intelligence Committee, said, "Passing this amendment takes us back to September 10."

Pointing to a Wall Street Journal editorial that came out Wednesday, Rep. Mac Thornberry (R-Texas) contended that passing the amendment would reward Snowden.

"The only people who have benefited from the revelation of classified information ... the only result is that those who are engaged in Islamic jihad will have been benefited," said Rep. Michele Bachmann (R-Minn.). "Those that we seek to protect have not."

Bachmann's position on the bill, identical to that of the Obama administration, showed the strange bedfellows that Snowden's bombshell leaks have created.

Although Amash's amendment was defeated, civil liberties advocates found something to cheer in the closeness of the vote. Just two years ago, the House voted by a comfortable 250-153 margin to reauthorize the Patriot Act, which the administration uses to justify its phone metadata collection. On Wednesday, by contrast, a swing of just seven votes would have put Amash's amendment over the top.

Back then, said Conyers, "we didn't know about it."

Conyers also noted that this time, on the Democratic side, members up to and including House Minority Leader Nancy Pelosi (D-Calif.) pressured members to vote against the Amash amendment.

In 2005, Pelosi was stridently opposed to the section of the Patriot Act under debate now. She called the provisions being reauthorized a "massive invasion of privacy." But on Wednesday, she voted against reining in the Patriot Act.

A sign of how dimly the Democratic leadership viewed Amash's amendment could be seen in an emailed floor update from the office of House Minority Whip Steny Hoyer (D-Md.). The update described the sweeping NSA program approvingly as merely collecting phone records "that pertain to persons who may be in communication with terrorist groups but are not already subject to an investigation."

Conyers said the lobbying "was heavy. They were very worried about it."

But, he added, "the fact that they won this narrowly means they still are worried -- because this thing isn't over yet. This is just the beginning."

This story has been updated with reaction after the House vote.

Related on HuffPost:

Loading Slideshow...
  • Sen. Dianne Feinstein (D-Calif.)

    Sen. Dianne Feinstein (D-Calif.) said the court order for telephone records was part of a three-month renewal of an ongoing practice, <a href="http://www.huffingtonpost.com/huff-wires/20130606/us-nsa-phone-records-feinstein/" target="_blank">the Associated Press reported</a>. "It’s called protecting America," Feinstein said at a Capitol Hill news conference.

  • Sen. Mark Udall (D-Colo.)

    Sen. Mark Udall (D-Colo.) <a href="http://www.huffingtonpost.com/2013/06/06/verizon-phone-records-nsa_n_3397058.html?utm_hp_ref=politics" target="_blank">said</a> "the administration owes the American public an explanation of what authorities it thinks it has."

  • Senate Majority Leader Harry Reid (D-Nev.)

    Senate Majority Leader Harry Reid (D-Nev.) thought everyone "should just calm down." "Right now I think everyone should just calm down and understand this isn't anything that's brand new," Reid <a href="http://www.huffingtonpost.com/2013/06/06/verizon-phone-records-nsa_n_3397058.html?utm_hp_ref=politics" target="_blank">said</a>.

  • Former Vice President Al Gore

  • Sen. Jeff Merkley (D-Ore.)

    Sen. Jeff Merkley (D-Ore.) said in a statement: "This type of secret bulk data collection is an outrageous breach of Americans’ privacy."

  • Sen. Lindsey Graham (R-S.C.)

    Sen. Lindsey Graham (R-S.C.) said he was <a href="http://www.huffingtonpost.com/2013/06/06/lindsey-graham-nsa_n_3396223.html?1370532449" target="_blank">"glad" the NSA was collecting phone records. </a> "I don’t mind Verizon turning over records to the government if the government is going to make sure that they try to match up a known terrorist phone with somebody in the United States," Graham said in an interview on "Fox and Friends."

  • Sen. Saxby Chambliss (R-Ga.)

    Sen. Saxby Chambliss (R-Ga.) also claimed that reports of the NSA collecting phone records was "nothing particularly new." "Every member of the United States Senate has been advised of this," Chambliss<a href="http://www.huffingtonpost.com/2013/06/06/verizon-phone-records-nsa_n_3397058.html?utm_hp_ref=politics" target="_blank"> said</a>. "And to my knowledge we have not had any citizen who has registered a complaint relative to the gathering of this information."

  • Sen. Bob Corker (R-Tenn.)

    Sen. Bob Corker (R-Tenn.) found the NSA collecting phone records <a href="http://www.huffingtonpost.com/2013/06/06/verizon-phone-records-nsa_n_3397058.html?utm_hp_ref=politics" target="_blank">"troubling."</a> "The fact that all of our calls are being gathered in that way -- ordinary citizens throughout America -- to me is troubling and there may be some explanation, but certainly we all as citizens are owed that, and we're going to be demanding that," Corker <a href="http://www.huffingtonpost.com/2013/06/06/verizon-phone-records-nsa_n_3397058.html?utm_hp_ref=politics" target="_blank">said</a>.

  • Sen. Ted Cruz (R-Texas)

  • Sen. Mike Lee (R-Utah)