Follow CBSDFW.COM: Facebook | Twitter

WASHINGTON (AP) – The Senate on Wednesday blocked an expansion of the government’s power to investigate suspected terrorists, a victory for civil libertarians and privacy advocates emboldened after a National Security Agency contractor’s revelations forced changes to surveillance of Americans.

READ MORE: Day 2 Of The State Fair Of Texas Brings Visitors Fun, Football & Fried Food

Senior Republicans had pressed for allowing the FBI to obtain a person’s digital fingerprints without first securing a judge’s permission after the mass shooting at a gay nightclub in Orlando, Florida, left 49 dead and 53 injured. The gunman had pledge allegiance to the Islamic State and other militant groups.

But on Wednesday, the Senate voted 58-38, two votes short of the 60 necessary to move ahead on the measure.

“We aren’t asking for content, we’re asking for usage,” Sen. John McCain, R-Ariz., in defense of the measure. “This is an important tool.”

Three years ago, former NSA contractor Edward Snowden’s revelations about the agency’s bulk collection of millions of Americans’ phone records set off a fierce debate, pitting civil libertarians concerned about privacy against more hawkish lawmakers fearful about losing tools to combat terrorism. Democrats and some Republicans pushed through a reauthorization of the Patriot Act last year that ended the program.

Civil libertarians and privacy advocates decried the measure to the Justice Department spending bill giving federal law enforcement direct access to email and text message logs, internet browsing histories and other potentially sensitive online data. Critics also doubted the new authority would have prevented the mass shooting in Orlando.

READ MORE: No Injuries Reported After Propane Tank Explosion At Texas Motor Speedway

Senior Republicans said FBI Director James Comey requested the authority, which they said builds on the agency’s existing ability to get financial and telephone billing records by using so-called national security letters.

The letters are essentially secret administrative subpoenas that compel telecommunication companies, banks and other businesses to hand over customer data. The content of a person’s private messages would not be collected, according to amendment’s backers, but the data may allow the FBI to head off a terrorist attack.

“It will allow the FBI to collect the dots so they can connect the dots, and that’s been the biggest problem that they’ve had in identifying these homegrown, radicalized terrorists, like the shooter in Orlando,” the Senate’s No. 2 Republican, John Cornyn of Texas, said.

The House last week rejected a measure that would have prohibited the U.S. government from searching the online communications of Americans without a warrant. The chairman of the House Intelligence Committee and other opponents of the measure cautioned it would compromise the investigation into the Orlando gunman, Omar Mateen, and the ability to disrupt other terrorist plots.

Just a year earlier — before the horror in Orlando and the mass shooting in San Bernardino, California — the amendment easily cleared the House by a wide margin. But it was later stripped out of a governmentwide spending bill.

The amendment that failed Wednesday also would have made permanent the “lone wolf” provision in last year’s USA Freedom Act that allows the surveillance of non-U.S. citizens in the United States who may be plotting to attack Americans but do not have direct connections to foreign terrorist groups.

MORE NEWS: Officials: 2 Missing Texas Kids Found Alive After Being Kidnapped By Registered Sex Offender

(© Copyright 2016 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.)