A critical mass of Senate Democrats voted with Republicans on Tuesday to shut down any further debate on a bill that strengthens the government’s spying powers. The bill would renew a key surveillance authority for the National Security Agency until 2023 and consolidate the FBI’s power to search Americans’ digital communications without a warrant.

The motion, which passed 60-38, virtually guarantees that the final bill will pass likely later this week and quashes any opportunity to debate whether protections should be added. Eighteen Democrats — including Sen. Dianne Feinstein, who had previously proposed an amendment to restrict the FBI’s surveillance authority — voted in support of the motion. They were joined by 41 Republicans and one independent, Angus King, giving the pro-surveillance bloc the supermajority needed to push the bill forward. Sens. John McCain, R-Ariz., and Dan Sullivan, R-Ala., did not vote.

Sen. Mark Warner, the top Democrat on the Intelligence Committee, lobbied for the bill’s passage on the Senate floor alongside his Republican counterpart from North Carolina, Richard Burr, and Republican leader Mitch McConnell. Director of National Intelligence Dan Coats stood outside the Senate chamber; he had come in person to convince any skeptics of the bill’s merits, Burr said.

Just after 7 p.m. on Tuesday, Missouri Democrat Claire McCaskill cast the decisive vote in favor of the motion. Thirty Democrats opposed it, including minority leader Chuck Schumer, along with eight Republicans, led by libertarian Rand Paul, R-Ky., and Mike Lee R-Utah.

Tuesday’s vote was a major blow to privacy activists, who saw the sunset of NSA authority as a strategic opportunity for Congress to rein in NSA surveillance and restrict how the government can use the information it collects. “The American people deserve to have an opportunity for some real amendments to make sure, at the end of the day, we have policies that keep our people safe and protect our liberties,” said Oregon Democrat Ron Wyden. “What we’re debating is whether the Senate will be the Senate.”

The bill, which passed in the House last week with backing from Democratic leadership, reauthorizes Section 702 of the Foreign Intelligence Surveillance Act. The decade-old law allows the NSA to sweep up communications between Americans and foreign “targets” without a warrant. The result is that the NSA collects massive amounts of Americans’ communications — including wholly domestic ones — under the pretext that it is “targeting” foreigners.

Documents leaked by Edward Snowden in 2013 revealed that the law serves as the basis for two of the NSA’s largest surveillance programs: PRISM, which collects communications from U.S.-based internet companies, and Upstream, which scans the data passing through internet junctions as it enters and exits the U.S.

Tuesday’s vote left privacy activists questioning why Democrats would willingly hand such massive powers to the Trump presidency. “The few Democrats who voted against allowing even the opportunity for amendments or open debate are giving President Trump dangerous and unchecked domestic surveillance powers,” said Daniel Schuman, policy director for the digital rights group Demand Progress. “They’ll now have to join the rest of Americans in looking over their shoulders at a government whose tremendous powers could be aimed at them.”

Warner was able to persuade enough of his colleagues to break with the Democratic leader by pointing out an obvious fact: that the intelligence community has used Section 702 authorities to track down terrorists abroad. He cited the case of Haji Iman, the Islamic State’s former finance minister, who was killed in 2016 in a U.S.-backed military operation in Syria.

“Between 702 and other intelligence that was developed, the [intelligence community] was able to track down the movements of Mr. Iman, [which] ultimately [resulted] in taking him off the battlefield,” Warner said on the floor before the vote.

But critics of the bill contended that Warner was making a deeply disingenuous argument. Senators who spoke against the motion pointed out that they weren’t trying to restrict targeting of terrorists overseas; they were trying to set limits on how the government could use the information “incidentally” collected on Americans.

For years, privacy activists have warned that a loophole in the law allows the FBI to conduct “backdoor searches” on Americans’ communications. That happens because the NSA shares certain types of 702 data with the FBI, which can search the data to access Americans’ communications, circumventing the normal process, which would require a warrant. The FBI’s use of these searches is so extensive that Justice Department lawyers have compared the process to searching Google.

Speaking against the motion Tuesday, Paul argued that the entire premise of backdoor searches is unconstitutional. “Should the government be allowed to search this database to prosecute you for not paying your taxes or for a minor marijuana violation? Absolutely not,” said Paul. “Why? Because this information is gathered without a warrant.”

Republican leadership in the House of Representatives put a minor restriction on backdoor searches in the bill to get a buy-in from Republicans on the House Judiciary Committee. It would require the FBI to get a warrant before conducting searches related to an established criminal investigation.

But the bill carves out large exceptions to that rule, including for national security cases and whenever the FBI determines there is a “threat to life or serious bodily harm.” And it still allows the FBI to sift through the data before opening a criminal case. Restriction aside, critics have said the bill does more harm than good because it codifies a legally questionable practice into law.

Most importantly, privacy activists saw the Senate vote as a monumental defeat, which not only gives vast surveillance powers to Donald Trump, it helps consolidate them for future presidencies.

“A truly remarkable historical moment,” tweeted Elizabeth Goitein, co-director of the Brennan Center’s Liberty and National Security Program. “If Dems had held firm, they could have blocked a bill to give the Trump administration unprecedented powers to spy on Americans. But they didn’t. So now, this president — and future ones — will almost certainly be handed that power.”