In his first year in office, Donald Trump has achieved the seemingly impossible: By variously criticizing Barack Obama’s surveillance practices and promising to ramp up his own, he has managed to galvanize a bipartisan movement in Congress to curb the warrantless surveillance of Americans. If the effort succeeds, it could represent the most significant reform of U.S. surveillance practices in decades.

At issue is Section 702 of the Foreign Intelligence Surveillance Act (FISA), which is set to expire in December. The Trump administration argues that Section 702 is a crucial counterterrorism tool and insists that Congress renew it without alteration. But many Democrats and an increasing number of Republicans are concerned about the law’s potential for abuse, and are calling for changes to better protect Americans’ privacy. “Congress must reauthorize this critical national security tool—but not without reforms,” says Robert Goodlatte, the chairman of the House Judiciary Committee.

Section 702 was enacted in 2008 to legalize George W. Bush’s warrantless wiretapping program. It allows the National Security Agency to collect the communications of any foreigner overseas—including communications with Americans—without a warrant. The foreigner need not be suspected of wrongdoing; although the government must be seeking “foreign intelligence,” the law’s broad definition of this term provides little constraint. A special court known as the FISA Court provides oversight, but its powers are limited—for example, it has no authority to review the government’s choice of surveillance targets.

Intelligence officials downplay the law’s effect on Americans, emphasizing that the “targets” are foreigners, while the Americans who communicate with them are surveilled only “incidentally.” But whatever significance this distinction might hold for the NSA, the impact on Americans’ privacy is the same. Communications are like joint property; a trespass necessarily affects both parties. Nor does the lack of constitutional protections for foreigners somehow cancel out Americans’ Fourth Amendment right to be free from unreasonable searches and seizures.

Describing the collection of Americans’ communications as incidental also wrongly implies that it is rare. A bipartisan group of lawmakers has called on the government to provide an estimate of how many Americans’ communications are caught up in the NSA’s net. The Trump administration claims, implausibly, that no estimate is possible. But given that, as of 2011, the NSA was acquiring 250 million internet communications each year, the total is almost certainly in the millions.

How concerned should Americans be about what happens to these communications? The law’s privacy protections turn out to be quite flimsy in practice. The government must minimize the sharing and retention of Americans’ information. But as Edward Snowden revealed, far from keeping it close and deleting it quickly, the NSA distributes the information to other agencies—notably the CIA and FBI—and most of it is held for at least five years.

Moreover, the government helps itself to the data, turning a law designed to target foreigners into a potent tool for spying on Americans. Section 702 requires the government to certify before collection that it is not targeting a foreigner to gain access to any particular American’s communications—a practice known as “reverse targeting.” Yet once it has the information, the government claims the right to comb through it, searching for specific Americans’ conversations. This bait and switch creates a massive end run around the Fourth Amendment. Government agents performing these backdoor searches can listen to Americans’ calls and read their emails without any evidence of wrongdoing, let alone a warrant.

Even after Snowden revealed these practices—and despite the government’s history of systemic violations of FISA Court orders—many lawmakers shrugged off concerns that Section 702 could be abused to spy on political opponents or vulnerable minorities. Democrats placed their faith in the Obama administration’s rectitude, and Republicans placed theirs in the intelligence community.

Donald Trump has changed this dynamic. He has alarmed Democrats by calling for increased surveillance of Muslim Americans and immigrants, and by showing a general disregard for the rule of law. And he has roused Republicans with claims that Obama wiretapped Trump Tower and improperly circulated information about Trump aides obtained through surveillance. Although unsubstantiated, Trump’s allegations have created a rare right-wing backlash against the intelligence establishment.

Lawmakers from both parties are thus eyeing reforms that would fortify civil liberties while preserving America’s ability to surveil foreign threats. The primary reform under consideration, and the most important one, would require U.S. officials to obtain a warrant before accessing Americans’ communications. The House of Representatives has already voted twice to enact such a measure.

Congress is also considering a provision to clarify that the NSA may collect only communications to and from targets—not communications that merely mention them. Although the NSA recently halted this so-called “about” collection for technological reasons, the agency hopes to resume it. This practice greatly amplifies the law’s potential for abuse by sweeping in wholly domestic communications.

These are critical reforms, but problems remain. A bipartisan group of House Judiciary Committee members has introduced a reform bill that would leave the back door ajar by allowing warrantless searches for Americans’ data if the government seeks “foreign intelligence information.” This distinction would set a dangerous and unjustified precedent. Currently, the government must obtain a warrant to target an American for surveillance, whether the purpose is to investigate a crime, obtain foreign intelligence, or protect national security. Circumventing this requirement through backdoor searches violates Americans’ privacy rights regardless of the government’s motive.

Moreover, an exception for foreign intelligence searches could swallow the rule, particularly for immigrants and American Muslims. FBI agents can open a preliminary “assessment”—a precursor to a full-fledged investigation—with literally no evidence of a threat. They need only an “authorized purpose,” such as a desire to rule out worrisome foreign ties. It’s not hard to imagine the rise of a two-tiered system, in which the FBI must obtain a warrant to read the emails of John Smith but not those of Javier Lopez or Mohammed Abdou.

Congress should firmly close the back door by requiring a warrant to access Americans’ data, regardless of the government’s ostensible purpose. It should also narrow the front door, by limiting the pool of permissible foreign targets to people who act on behalf of foreign powers (such as foreign governments or other government-controlled entities) or those suspected of terrorist ties. This would not only protect innocent foreigners, who have privacy rights under treaties the United States has signed; it would also protect the millions of Americans who communicate with them. And it would remove a cloud looming over the U.S. technology sector, as European courts threaten to overturn data-sharing agreements between U.S. and EU companies because of the NSA’s ability to dip into the data.

Critically, these reforms would not affect Section 702’s utility in protecting national security. None of the success stories intelligence officials have showcased involved backdoor searches, reliance on “about” collection, or targeting private citizens with no suspected connection to terrorism. In the often-cited case of U.S. citizen Najibullah Zazi, for instance—who was convicted in 2010 of plotting to bomb the New York City subway system—the target of Section 702 surveillance was a known Al Qaeda courier in Pakistan; in monitoring his email, the NSA came across incriminating messages from Zazi.

Donald Trump nonetheless opposes any reforms. Despite claiming to be a victim of surveillance himself, he has no interest in blunting a tool he now wields. And the intelligence agencies are lobbying hard to avert changes, invoking the specter of terrorist attacks not prevented—a strategy that virtually always succeeds. This time, though, the words “national security” should not be enough to end the debate. Lawmakers should find the courage to reject the false choice between safety and civil liberties, and embrace both.