A coalition of privacy-minded senators nearly succeeded Tuesday night in blocking the path to extend a critical government surveillance program that allows the National Security Agency to target foreign communications without a warrant.

Eight Senate Republicans joined more than two-dozen Democrats in an attempt to derail the extension of the program, but their efforts ultimately fell short by one vote. The final vote count was 60 to 38.

The Senate Republicans who voted against advancing the measure to renew the spying authorities for six years were Sens. Ted Cruz of Texas, Steve Daines of Montana, Cory Gardner of Colorado, Dean Heller of Nevada, Mike Lee of Utah, Jerry Moran of Kansas, Lisa Murkowski of Alaska, and Rand Paul of Kentucky.

The vote focused on the reauthorization of Section 702 under the Foreign Intelligence Surveillance Act, or FISA, which authorizes U.S. intelligence agencies to spy on foreigners abroad who communicate through American phone and internet providers. Under the law, the FBI can then search the database of data collected under the program for information on Americans suspected of a crime without first obtaining a warrant.

Several senators, including Paul and Sen. Ron Wyden (D., Oregon), had vowed to filibuster the legislation in an attempt to force limits on the program.

The vote lasted for over an hour as lawmakers attempted to wrangle votes from fence sitters. Sens. John Kennedy (R., La.) and Claire McCaskill (D., Mo.) eventually approved the measure, pushing it to the 60-vote threshold needed to clear a procedural hurdle to limit debate in the Senate. The legislation is likely to receive final approval on Wednesday or Thursday.

The bill passed through the House last week, putting it on course to hit President Donald Trump's desk for a signature by Friday, when the program expires.

The law is up for renewal for the first time since the high-profile leaks by form NSA contractor Edward Snowden that exposed the government's sweeping surveillance apparatus, which includes the programs authorized under Section 702.

Intelligence chiefs and senior law enforcement officials have described the 702 tools as critical to the nation's counterterrorism efforts.

Last month, Attorney General Jeff Sessions, FBI Director Christopher Wray, Director of National Intelligence Dan Coats, CIA Director Mike Pompeo, and NSA Director Mike Rogers released a joint statement saying the failure to reauthorize the program would make the United States "less secure."

Natalie JohnsonEmail Natalie | Full Bio | RSSNatalie Johnson is a staff writer at the Washington Free Beacon. Prior to joining the Free Beacon, she was a news reporter at the Daily Signal. Johnson’s work has been featured in outlets such as Newsweek, Fox News and Drudge Report. She graduated from James Madison University in 2015 with a B.A. in political science and journalism. She can be reached at johnson@freebeacon.com. Her twitter handle is @nataliejohnsonn.