The Senate joined the House in passing a six-year renewal of Section 702 of the Foreign Intelligence Surveillance Act, over the objections of civil libertarians who say the law makes it too easy to spy on Americans without a warrant, Politico reports .

The law is mostly designed to allow warrantless surveillance of people overseas with no ties to the United States, using data the NSA vacuums up from telecom giants as well as major internet companies like Facebook, Google, and Apple. But it also allows other security agencies, including the FBI, to examine conversations and internet data from Americans that get swooped up in the course of such monitoring, a process sometimes called “backdoor” surveillance. At a 2015 hearing of the secret FISA court, one Justice Department lawyer described these backdoor searches as the “FBI’s ‘Google’ of its lawfully acquired information.”

Under the law just passed, a new restriction would require that the FBI obtain a warrant before conducting searches related to an established criminal investigation. But the bill permits exceptions to that rule, including in cases involving national security and when the FBI determines there is a “threat to life or serious bodily harm.” And the bill still lets the FBI search surveillance data related to U.S. persons before it opens a criminal case.

As passed, the law would also enable the National Security Agency to resume a practice sometimes called “about” collection, whereby the agency grabs communications that simply mention a particular target, rather than being sent to or from that person. The NSA had voluntarily abandoned the practice last year under scrutiny from the FISA court.

The Trump administration supports the bill, which passed the Senate 65-34 with votes from both parties, despite objections from senators who argued the bill doesn’t do enough to protect individual liberties.

Rand Paul, the Republican from Kentucky, and Ron Wyden, the Oregon Democrat, both attempted to filibuster the bill on Tuesday, and had cosponsored an alternative bill that had support from civil rights groups, but it never reached the Senate floor for debate.

“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,” Paul said on Tuesday, arguing that warrantless searches were unconstitutional. “Rubber-stamping this awful bill is a dereliction of duty by a Congress that has a responsibility to protect Americans’ freedoms, as well as our country’s security,” said Wyden.