Unmasking. Leaks. Wiretaps. The mounting surveillance scandals of 2017 are suddenly threatening one of the most effective intelligence-gathering programs in U.S. history.

For months, administration officials have been publicly pressing lawmakers to reauthorize Title VII of the FISA Amendments Act of 2008, which expires in December. Their efforts are focused on Section 702, which permits the surveillance of foreigners abroad who are likely to communicate intelligence information. Director of National Intelligence Dan Coats described 702 as the “crown jewels” of the intelligence community during his February confirmation hearings.

“If we were to lose 702’s authorities, we would be significantly degraded in our ability to provide timely warning and insight as to what terrorist actors, nation-states, criminal elements are doing,” National Security Agency director Mike Rogers told senators in May. “I would highlight much—not all—much of what was in the intelligence community’s assessment, for example, on the Russian efforts against the U.S. election process in 2016 was informed by knowledge we gained through 702 authority.”

“A clean reauthorization of FISA Section 702 does not have the votes to pass in the House,” says House Judiciary chairman Bob Goodlatte. “The House Judiciary Committee is working hard to achieve consensus to reform and reauthorize Section 702, consulting all interested parties including the White House, national security agencies, and privacy advocates.”

A majority of GOP lawmakers supported renewal in 2012. But they’ve been spooked by recent controversies, from the leaks about Michael Flynn’s conversations with a Russian diplomat to allegations that Barack Obama ordered the wiretapping of Trump Tower. Combined with the concerns of privacy-minded lawmakers on both sides of the aisle, these fresh controversies are making a straight reauthorization of the program less likely.

“I want to renew the program,” says Senator Lindsey Graham, “but I don’t want to renew a program that can be used by political people to gather political intelligence, not national security intelligence.”

At the core of all these debates is a lack of trust, says Alex Abdo, a former ACLU lawyer who is a senior staff attorney at the Knight First Amendment Institute. “Support for reform has grown stronger with the realization that we need limitations and rules in place designed to constrain government officials whose motives we do not trust. Many who were willing to give President Obama a free pass on surveillance now see the folly in entrusting such enormous authority to the good graces of the executive.”

April Doss, a former NSA lawyer, argues that it was precisely this lack of trust that required the restrictions on surveillance written into the law. “Just because a locksmith can open everyone’s doors doesn’t mean that he is,” Doss said in March. (She has since begun working on the Senate Intelligence Committee’s Russia probe.) “You don’t just trust the locksmith and take his word for it that he’s not actually out there, creeping from house to house and car to car and surreptitiously opening people’s doors. You do want to be able to have some way to make sure he isn’t actually doing that. But that’s what we build into statutes like FISA and Section 702.”

The February firing of Trump’s first national security adviser, Michael Flynn, rekindled long-running surveillance arguments. Flynn’s pre-inaugural contacts with the Russian ambassador to the United States had been captured by American intelligence and subsequently exposed in the press. This leak of highly classified information was illegal.

It is unlikely that Flynn’s communications were intercepted using 702, since the Russian ambassador spends a large chunk of his time in America—Section 702 does not authorize surveillance on U.S. soil. But to Republicans worried about potential privacy invasions and surveillance abuses, this may be a distinction without a difference.

The issue flared back up in March, when House Intelligence Committee chairman Devin Nunes suggested that the identities of Trump transition officials had been improperly revealed to Obama officials, in a process known as “unmasking.” If Americans’ communications are included in intelligence reports, their identities are usually redacted, or “masked.” Administration officials can request that names be “unmasked” when they believe an identity is key to understanding the information in the report. Nunes further charged that details about transition officials “with little or no apparent foreign intelligence value” had been included in intelligence reports. This information, he said, had been swept up via “incidental collection,” which can occur when a foreign target communicates with a non-targeted individual. Incidental collection is an unavoidable result of intelligence gathering and drives civil libertarians’ complaints about “warrantless” surveillance.

Nunes has forged ahead with his investigation and subpoenaed intelligence agencies in late May for details about any unmasking requests made by Obama officials, including former national security adviser Susan Rice. “If we find that there’s violations of 702, which is part of this investigation, and we find that there was leaking of those U.S. individuals’ identities for political purposes, that is going to be exposed,” says Florida congressman Tom Rooney, a member of the intelligence committee. “It’s also going to really hurt our chances of reauthorizing 702.”

“We’re not going to reauthorize these surveillance programs if the American people aren’t satisfied that their security will be safeguarded,” South Carolina representative Trey Gowdy said in an interview with Fox News in May. “Leaks are one issue. The unmasking within the intelligence community, that is a privilege to be able to request that a U.S. person’s name be unmasked.”

Republicans in the Senate, though, are rallying behind a bill that would make Title VII of the FISA Amendments Act, including Section 702, permanent.

“Our enemies and the threats to our country don’t sunset, so I don’t think this critical legislation should sunset either,” says Arkansas senator Tom Cotton, who introduced the bill. “I believe that we’ll have a strong majority in the Senate to once again reauthorize 702, and hopefully permanently this time.”

The controversies influencing the 702 debate in the House seem to be having little effect on the Senate. “There’s some mythology surrounding that,” says Majority Whip John Cornyn, a leading proponent of 702 renewal. “I’m more than happy to listen to good-faith concerns that would strengthen oversight. But I’m not for doing anything that would undermine the efficacy of the program.”

Still, asked about the chances for a “clean” 702 reauthorization, Senate Republicans recognized that Washington is on shifting sands. “I don’t know what to expect anymore,” says Oklahoma senator James Lankford, a co-sponsor of Cotton’s bill.

Intelligence committee chairman Richard Burr, another co-sponsor of Cotton’s legislation, says that a clean reauthorization “depends on how you define clean.” When pressed, he responded: “There will be changes.”

Senate Democrats are suspicious of Cotton’s bill. Making 702 permanent, they argue, would detract from Congress’s unique oversight role. “Any reauthorization should include a sunset provision, and without it, it will not have my support,” Dianne Feinstein, the top Democrat on the Senate Judiciary Committee, said at a June hearing. “Society changes,” she went on. “The world changes. Technology and communications change, and a sunset allows us to review and revise such as may be necessary due to technology changes, as well as other changes, that happen at such a rapid pace.”

Beyond the recent controversies linger longstanding concerns about government surveillance programs. Key details of the 702 program were revealed by the New York Times in 2013 in the wake of the leaks by former NSA contractor Edward Snowden. His disclosures triggered demands for privacy protections and government transparency that continue to inform this year’s reauthorization debate.

One proposed reform centers on closing the “backdoor search loophole”—intelligence agencies’ ability to query 702-collected data using terms like an American’s email address or social media handle. Privacy advocates have been especially concerned by the FBI’s access to 702-acquired information during criminal investigations, arguing that a warrant should be required to perform searches using such terms. National security officials counter that adding a warrant requirement would hamper the government’s ability to “connect the dots” between intelligence-gathering and criminal investigations. The FBI only receives a small subset of 702 information, they point out, and any use of such data in a criminal case requires the specific approval of the attorney general.

Another major reform concerns “about” collection—the gathering of communications that merely mention a specific target rather than being directly to or from a target. After discovering and self-reporting a number of related compliance incidents, the NSA announced an end to “about” collection in April. NSA analysts had inadvertently searched a chunk of intelligence using U.S. person identifiers. Civil libertarians want “about” collection banned because it sweeps up wholly domestic communications.

“The government hasn’t forsaken the authority,” says Alex Abdo. “On the contrary, it has made clear it ended it only for technical reasons, not for legal ones, and so it may one day soon ask the FISA court to reinstate that authority, making a permanent codification of its end critical.”

But the biggest concern for the growing number of Republican skeptics involves the potential abuse of “unmasking” privileges by executive branch officials. Tom Rooney said the intelligence panel is considering reforms that would subject the unmasking process to more oversight, requiring even cabinet members to list reasons for unmasking in detail. These additional requirements, he suggested, could also be introduced as a stand-alone bill rather than being amended to the FISA reauthorization.

“One of the things that we’re looking at specifically with some of these witnesses who are cabinet-level people is how come when you wanted somebody unmasked, there was very little reason given?” Rooney says. “One of the changes you may see is that you have to be much more specific.”

The Florida Republican says that he is “50-50” as to whether 702 will be reauthorized, but predicted that with reforms, the chances for reauthorization would improve.

Jenna Lifhits is a staff writer at The Weekly Standard .