Updated 1:12 p.m.
By an overwhelming margin, the House passed a funding bill Friday that among other things would significantly rein in intelligence agencies' ability to search through data they have collected and stop them from placing secret "back doors" into software and hardware products.
The bill includes an amendment, sponsored by Reps. Thomas Massie (R-Ken.), Jim Sensenbrenner (R-Wis.) and Zoe Lofgren (D-Calif.), that adds the new restrictions. The bill passed Friday on a 340-to-73 vote. The amendment was passed Thursday night in a 293-to-123 vote that surprised even those who have supported greater limits on the National Security Agency's powers.
The 2015 defense appropriations bill still needs to get worked out with the Senate, where the amendment's prospects are uncertain.
If passed as-is by the Senate, the bill would block the government from doing two things: search government databases for information on a U.S. citizen without a warrant, and force an organization to build into its product any technical "back door" that would assist the CIA or NSA with electronic surveillance.
Under a 2008 law known as the FISA Amendments Act, the NSA may acquire communications without an individualized warrant if one of the parties is reasonably believed to be a foreigner located outside the country and if the information is for a valid foreign intelligence purpose.
The amendment would bar the use of funds for searching an American's communications under this authority without a warrant.
Government officials contend that they are not required to obtain a warrant to search on data acquired lawfully. To do so would be a burden that would impair intelligence investigations, they say. The Foreign Intelligence Surveillance Court in 2011 reversed a previous ban on such warrantless searches.
The amendment would also block the NSA and the CIA from asking or requiring a person to "alter its product or service to permit the electronic surveillance" of users -- essentially a ban on back doors in software and hardware.
Some security experts have argued building in such access leaves systems more vulnerable to exploitation by non-government entities: Simply, if there are problems, hackers will find them.
Privacy advocates, digital rights organizations, and some tech companies (including Google) supported the amendment in a letter to House leadership earlier this week. Some groups, including the Electronic Frontier Foundation and Demand Progress, organized a campaign to promote the cause called through the site ShuttheBackDoor.net.
But the amendment's success was somewhat unexpected -- even to some supporters. Massie seemed taken aback the amendment's success, telling Huffington Post reporter Matt Sledge he was "pleasantly surprised" by it's passage.
Kevin Bankston, the policy director at the New America Foundation's Open Technology Institute praised the amendment's passage, calling it "heartening." He also said the success of the amendment signaled "widespread discontent amongst House members" over how the USA Freedom Act, a previous bill aimed at reining in NSA surveillance sponsored by Sensenbrenner, was "watered down" by the House leadership in concert with the intelligence community. While the USA Freedom Act passed the House several weeks ago, half of the its 154 earlier co-sponsors in the chamber ended up voting against altered version.
This isn't the first time members of the House have tried to use the appropriations process to limit government surveillance powers in the wake of revelations about the scope of NSA activities due to leaks from former NSA contractor Edward Snowden. Last summer, Rep. Justin Amash (R-Mich.) spearheaded an amendment to defund the NSA's bulk phone records program -- narrowly losing despite opposition from leadership on both sides of the aisles.