A bipartisan group of House lawmakers has struck a deal on a controversial spy law due to sunset at the end of the year, setting up a fight with the Trump administration over potential limits to the National Security Agency’s (NSA) warrantless surveillance program.

Three members of the House Judiciary Committee — Chairman Bob Goodlatte Robert (Bob) William GoodlatteNo documents? Hoping for legalization? Be wary of Joe Biden Press: Trump's final presidential pardon: himself USCIS chief Cuccinelli blames Paul Ryan for immigration inaction MORE (R-Va.), ranking member John Conyers (D-Mich.) and Rep. Jim Sensenbrenner Frank (Jim) James SensenbrennerRepublicans call for Judiciary hearing into unrest in cities run by Democrats Scott Fitzgerald wins Wisconsin GOP primary to replace Rep. Jim Sensenbrenner Hillicon Valley: House panel grills tech CEOs during much anticipated antitrust hearing | TikTok to make code public as it pushes back against 'misinformation' | House Intel panel expands access to foreign disinformation evidence MORE (R-Wis.) — have privately agreed to support extending the law through 2023, The New York Times reports.

But as part of that extension, according to congressional officials who spoke to the Times on the condition of anonymity, the lawmakers have agreed to push for some limits to the law.

ADVERTISEMENT

Among those limits: Requiring FBI agents to obtain a warrant before sifting through the program’s database of intercepted messages for data about American criminal suspects, a currently permissible practice derided by critics as the “back-door search loophole.”

They also want to prohibit the agency from collecting emails that are about a foreign target but are neither to nor from that person. The NSA voluntarily halted such collection, known as “about” surveillance, earlier this year, but wants to retain the authority to resume it.

The committee is also expected to include a requirement that any executive branch official seeking to “unmask” or reveal the identity of an American citizen in intelligence reports sign a certification avowing that they need the information for a legitimate national security purpose, according to the Times. The identities are typically hidden to minimize privacy invasions.

The arrangement is not yet public and is currently being crafted by Judiciary Committee staffers, the newspaper reported.

The Trump administration opposes key details of the arrangement. Earlier this month, Attorney General Jeff Sessions Jefferson (Jeff) Beauregard SessionsTrump's policies on refugees are as simple as ABCs Ocasio-Cortez, Velázquez call for convention to decide Puerto Rico status White House officials voted by show of hands on 2018 family separations: report MORE and National Intelligence Director Dan Coats Daniel (Dan) Ray CoatsFBI chief says Russia is trying to interfere in election to undermine Biden The Hill's Morning Report - Sponsored by The Air Line Pilots Association - Trump, Biden renew push for Latino support Former Intel chief had 'deep suspicions' that Putin 'had something on Trump': book MORE reiterated the administration's calls for the law to be extended permanently, with no sunset.

“Reauthorizing this critical authority is the top legislative priority of the Department of Justice and the Intelligence Community,” they wrote in a Sept. 7 letter to both Republican and Democratic leaders that was made public on Monday.

The key provision of the law — known as Section 702 of a 2008 package of amendments to the Foreign Intelligence Surveillance Act (FISA) — is aimed at collecting data on foreign spies, terrorists and other targets.

It allows the government to collect the emails and phone calls of foreigners abroad from American internet and phone companies — without individual court orders and even when those foreigners communicate with Americans.

Civil liberties advocates have long pushed for Congress to close the so-called backdoor search loophole allowing federal investigators to sift through Americans’ information that has been “incidentally” caught up in 702 collection.

That position has recently gained more traction in Congress, after several years of disappointment for reform advocates. House lawmakers in 2016 voted down language that would have closed the loophole, while identical provisions tacked on to an annual funding bill sailed through the House in 2015 and 2014, but were stripped out before the bill reached then-President Obama’s desk.

Critics say that by not requiring investigators to seek a warrant for each individual search, the government is violating the Fourth Amendment — a position on which the Trump administration has pushed back.

“National security officials may use search terms or identifiers associated with Americans, such as an email address, to query the information lawfully acquired using Section 702 authority," homeland security adviser Thomas Bossert wrote in a June op-ed in The New York Times.

"But this does not entail the collection or search of any new information, and the practice has been upheld by the FISA court and all other federal courts that have considered this issue," he continued.

"Imposing a warrant requirement to conduct such data queries, as some in Congress have proposed, would be legally unnecessary and a step toward re-erecting pre-9/11 barriers to our ability to identify foreign terrorists and their contacts."

Permanent reauthorization has some key advocates on the Hill — such as Sen. Tom Cotton Tom Bryant CottonRenewed focus on Trump's Supreme Court list after Ginsburg's death Republicans call for DOJ to prosecute Netflix executives for releasing 'Cuties' Loeffler calls for hearing in wake of Netflix's 'Cuties' MORE (R-Ark.) — there is also a powerful bipartisan group of lawmakers that believes the law needs reforms.

“Congress must reauthorize this critical national security tool but not without reforms,” Goodlatte said in a statement.

Some privacy-minded lawmakers in the Senate are also demanding that the government disclose an estimate of the number of Americans swept up in the dragnet — a number Coats says is infeasible to produce because it would divert critical resources and endanger privacy by asking trained analysts to sift through Americans' data.

“The Trump administration appears to have calculated that hiding from Americans basic information relevant to their privacy is the easiest way to renew this expansive surveillance authority,” Sen. Ron Wyden Ronald (Ron) Lee WydenGOP senator blocks Schumer resolution aimed at Biden probe as tensions run high Republican Senators raise concerns over Oracle-TikTok deal Hillicon Valley: TikTok, Oracle seek Trump's approval as clock winds down | Hackers arrested for allegedly defacing U.S. websites after death of Iranian general | 400K people register to vote on Snapchat MORE (D-Ore.) said in a statement Tuesday.

Wyden has also dinged the administration over Coats’s answer to a question he posed during an open hearing earlier in the year — whether the government can use the FISA Amendments Act to collect communications that are wholly between Americans.

At the time, Coats said that the NSA could not legally do so. He later issued a more tailored statement avowing that the government could not “intentionally” collect communications in which the sender and all intended recipients are known to be located in the United States.

Wyden has since repeatedly pressed Coats to clarify his answers publicly. On Tuesday, he released a letter from Coats in which the intelligence chief claimed that Wyden already had the information he was seeking but that the details were classified and could not be made public.

Wyden, who is known as a privacy hawk, has demonstrated a well-known pattern of hinting at classified surveillance matters he believes are problematic and should be made public.

“The refusal of the [director of national intelligence] to answer this simple yes-no question should set off alarms,” he said Tuesday.

“How can Congress reauthorize this surveillance when the administration is playing games with basic questions about this program?"