This undated photo provided by the National Security Agency (NSA) shows its headquarters in Fort Meade, Md. - 

The House voted down an amendment to the defense appropriations bill yesterday that would have cut money from the National Security Agency's surveillance programs.

The vote was close -- 217 to 205. The amendment would have prohibited most funding for the NSA phone data collection program that was revelead by former NSA analyst Edward Snowden.

A coalition of Democrats and libertarian Republicans backed the amendment. Congressman Ted Poe (R-TX) was one of them. He thinks the NSA’s phone and data collection is too broad.

“The government’s gone too far in the name of security," he says. "Rein in government invasion. No more dragnet operations. Get a specific warrant based on probable cause, or stay out of our lives.”

But other House members said NSA surveillance has made the country safer, and they prevailed. Still, the narrow victory shows just how divided Congress is over the NSA surveillance.

There was an unusual coalition of Democrats and Tea Party Republicans who voted for the amendment -- to cut off funding. The vote also shows the power of the purse strings. Without money from Congress, there would be no NSA surveillance program.