A federal judge in California withdrew a temporary order requiring the National Security Agency to retain the data it collects under a controversial and little understood section of the FISA Amendments Act after the NSA argued that being forced to hold onto the data would both be illegal and overwhelm its computer systems, rendering the United States and its allies vulnerable to a terrorist attack.

The decision, by District Court Judge Jeffrey White in Oakland, came as part of a long-running lawsuit filed by the Electronic Frontier Foundation on behalf of AT&T customers who allege that their communications have been intercepted in bulk by the NSA, violating the First and Fourth amendments.

White’s Friday decision came at an emergency hearing called by the judge after EFF attorney Cindy Cohn said that recent emails she had exchanged with the government’s lawyer indicated that the government was discarding surveillance data it collects under Section 702 of the FISA Amendments Act, which Cohn argued was in violation of an order White made in March ordering the NSA to retain it.

At the heart of the dispute between the EFF and the government are two legal authorities central to the kind of NSA surveillance exposed in detail by former contractor Edward Snowden.

Unlike information the NSA collects under Section 215 of the FISA Amendments Act, which is commonly understood as the authority by which the NSA gathers US telephone “metadata” in bulk from major communications companies, Section 702 provides the attorney general and director of national intelligence authority to target non-Americans and access the content of their communications - everything from their Facebook messages to their web browsing history. Some US lawmakers have said that the NSA uses Section 702 as a “back door” to spy, without a warrant, on Americans’ communications that might be somehow connected to a foreign “target.”

Retaining data collected under Section 702, which is routinely deleted by hand or by computer programs in accordance with “minimization procedures,” could overwhelm the NSA’s computers, its lawyers and staff claimed in court filings on Friday before White made his decision.

“Any attempt at an immediate solution would unleash a series of consequences that the U.S. government cannot predict,” NSA Deputy Director Richard Ledgett said in a written declaration, claiming that White’s order to retain all information collected under Section 702 would be not only technically impossible but also illegal because it would violate minimization procedures. Those procedures are approved by the secretive Foreign Intelligence Surveillance Court, though the individual orders tasking the NSA to spy on foreign targets are not.

According to Ledgett, the NSA maintains Section 215 telephone metadata on “a discrete computer systems architecture,” while Section 720 data resides “within multiple databases contained on multiple systems … constructed over many years at a considerable cost.” One consequence, tweeted the Cato Institute’s Julian Sanchez, is that such an arrangement could make oversight and security more difficult.

At any rate, Ledgett argued, making the technical changes that would satisfy White’s order would normally take months of planning, and implementing them immediately could require suspending all foreign spying under Section 720, which he called the NSA’s “most significant tool” for disrupting terrorist attacks.

“Processing of communications indicating a potential attack could be delayed to the point where the attack has already occurred before the communication can be identified, analyzed, and disseminated,” he said. “As a result, analysts will be prevented from accessing needed data placing national security at risk.”

According to EFF lawyers, White withdrew his temporary order requiring the NSA to retain Section 702 data but will allow the two sides to argue the issue before making a final decision. But for now, at least, the NSA’s spying has been deemed too big to fail.