Several controversial defense spending bill amendments were allowed to come to the House floor for votes Wednesday, and most of them were approved.

The only amendment that failed was Rep. Justin Amash's much-anticipated proposal to prohibit the National Security Agency from collecting metadata and phone records from individuals not under investigation.

The Michigan Republican's amendment would have denied funding for any NSA program that collected metadata and phone records but it was rejected in an unexpectedly close vote of 205-217.

A different amendment dealing with the NSA's spying power did pass. Rep. Mike Pompeo's amendment clarified that the NSA cannot use taxpayer funds to target anyone in the U.S. by collecting phone and e-mail data.

The Kansas Republican's amendment also said that the government could not listen to individual Americans' phone calls. That amendment passed by a vote of 409-12. Pompeo's amendment sailed through while Amash's failed, because Pompeo's left the original Foreign Intelligence Surveillance Act as-is and allows funding for data-collection programs.

Instead, Pompeo simply clarified what the law permits and what it doesn't, something that proponents of data collection contend has been distorted since Edward Snowden's revelations.

Other controversial amendments on Egypt and Syria also passed. An amendment sponsored by Rep. Thomas Massie, R-Ky., denied funds for military operations in Egypt, and the amendment from Rep. Trey Radel, R-Fla., barred U.S. funds going to Syrian rebels without prior congressional approval. Both passed by voice votes.