The amendment in question was attached to the Commerce, Justice, Science and Related Agencies Appropriations bill earlier this week, Consumerist reports. And it would have allowed the FBI to use "National Security Letters" to demand that your internet or cellphone provider turn over certain account information including login history, call records and IP address. Unlike a court-ordered subpoena, which has to go through a judge first, a National Security Letter can be handed down from another government official.

While Senator McCain called the amendment a "no-brainer" and claimed it would prevent terrorists from "sneaking into this country," his critics pointed out that it removes key checks and balances that insure citizens' privacy and freedom.

"If this proposal passes," privacy advocate and Oregon Senator Ron Wyden said during the debate, "FBI agents will be able to demand the records of what websites you look at online, who you email and chat with, and your text message logs, with no judicial oversight whatsoever. The reality is the FBI already has the power to demand these electronic records with a court order under the Patriot Act. In emergencies the FBI can even obtain the records right away and go to a judge after the fact. This isn't about giving law-enforcement new tools, it's about the FBI not wanting to do paperwork."

The amendment received 58 votes in favor, with 38 Senators voting against. Earlier this month, however, the House of Representatives voted down legislation that would have prevented the government from requiring technology companies from building in weakened encryption and security backdoors into their products. That legislation, which had won approval of the House twice in the past, lost a great deal of momentum following the recent shootings in San Bernardino and Orlando.