GRAND RAPIDS, MI — The U.S. House of Representatives on Wednesday narrowly defeated a proposal by Rep. Justin Amash to defund federal spying programs.

In what was widely seen as a litmus test for congressional opinion on controversial phone records snooping by the National Security Administration, the proposed change to a 2014 defense spending bill failed by a close 217-205 vote.

Ninety-four Republicans voted for the amendment, as did 111 Democrats. Amash's fellow West Michigan Rep. Bill Huizenga, R-Zeeland, voted in favor of the proposal.

Proponents and opponents of the amendment squared off during roughly 15 minutes of impassioned debate. There was no discernible party-line division, as is often seen, with some liberal Democrats speaking in support of Amash alongside libertarian Republicans.

Amash delivered a scathing rebuke against the NSA programs during his remarks, calling it a threat to the constitutional protection against unwarranted searches and seizures.

The sophomore lawmaker from Cascade Township implored colleagues to support the proposal, which would have barred funds from being used to collect phone records and metadata of Americans not connected to terrorist activities.

He also blasted opponents of the amendment, accusing them of fearmongering to suppress critics of the sweeping surveillance tactics unveiled earlier this summer by leaker Edward Snowden.

"They'll tell you that the government must violate the rights of the American people to defend us against those that hate our freedoms," Amash said.

"Tell that to our constituents back home," he said. "We're here to answer one question for the people we represent: Do we oppose the collection of every Americans' phone records?"

Amash's opening remarks were followed by vehement defense of the NSA by fellow Michigan Rep. Mike Rogers, R-Brighton, chair of the House Intelligence Committee

Rogers invoked the Sept. 11, 2001, terrorist attacks in making his case for continued records collection, saying "54 times this and the other program stopped and thwarted terrorist attacks, both here and in Europe, saving real lives."

"This isn't a game," Rogers said. "This is real. This will have a real consequence."

Perhaps in a swipe at Amash's popularity on social media, where he routinely explains votes and weighs in on legislation, Rogers added, "Are we so small that we can only look at our Facebook likes in this chamber?"

Amash's proposal garnered substantial attention in the national and international press. It was closely watched as a gauge of lawmakers' tolerance for the NSA's surveillance.

The Wall Street Journal editorial board also called for its defeat, and lambasted Amash for proposing it despite lacking experience with intelligence and military issues.

But Amash garnered broad support among lawmakers who view the NSA spying as a vast overreach.

Rep. John Conyers, D-Detroit, an amendment cosponsor and ranking member of the House Judiciary Committee, said the plan would have curtailed "the ongoing dragnet collection and storage of the personal records of innocent Americans."