Proposed legislation would have widened the FBI’s authority to use so-called national security letters, which do not require warrants and whose very existence are usually secret. Chip Somodevilla/Getty Images

The U.S. Senate Wednesday voted down a Republican-backed proposal to expand the FBI’s secretive surveillance powers after the mass shooting at a gay nightclub in Orlando, Florida, last week.

The measure followed the Senate’s rejection Monday of four measures that would have restricted gun sales.

During the voting Wednesday, Senate Majority Leader Mitch McConnell, R-Ky., switched his vote to “no,” giving himself the opportunity to bring the measure up for consideration again as soon as later this week.

The legislation would broaden the type of internet and telephone and records the FBI could request from companies such as the Google unit of Alphabet and Verizon Communications without a warrant. Opponents, including some major technology firms, have said it would threaten civil liberties and do little to improve national security.

Filed as an amendment to a criminal justice funding bill, the legislation before the Senate would widen the FBI’s authority to use so-called national security letters, which do not require warrants and whose very existence are usually secret.

Such letters can compel a company to hand over a user’s phone billing records. Under the Senate’s change, the FBI would be able to demand electronic communications transaction records such as time stamps of emails and the emails’ senders and recipients, in addition to some information about websites a person visits and social media login data.

It would not enable the FBI to use national security letters to obtain the actual content of electronic communications.

The legislation would also make permanent a provision of the USA Patriot Act that lets the intelligence community conduct surveillance on so-called lone wolf suspects who do not have confirmed ties to a foreign terrorist group. That provision, which the Justice Department said last year had never been used, expires in December 2019.

The bill had been expected to narrowly pass, but it fell two votes short of the required 60.

The future of the Senate proposal in the House of Representatives was also uncertain, given an alliance between libertarian-leaning Republicans and tech-friendly Democrats that has blocked past efforts to expand surveillance.

Privacy groups and civil liberties advocates accused Republicans this week of exploiting the Orlando shooting to build support for unrelated legislation.

Sen. Ron Wyden, D-Ore., criticized Senate Republicans for “pushing fake, knee-jerk solutions that will do nothing to prevent mass shootings or terrorist attacks.”

Although Republicans invoked the Orlando shooting in support of the bill, FBI Director James Comey has said Omar Mateen’s transactional records were fully reviewed by authorities who investigated him twice for possible extremist ties. Comey also has said there was “no indication” Mateen belonged to any extremist group and that it was unlikely authorities could have done anything differently to prevent the attack.