The US government has been ordered “not to destroy” records gleaned from National Security Agency surveillance that are relevant to active lawsuits challenging the legality of spying programs, a federal judge said Thursday.

US District Court Judge Jeffrey White said evidence pertaining to the government’s use of Section 702 of the Foreign Intelligence Surveillance Act is relevant to a current court case and should be preserved.

The ruling came after a request by the Electronic Frontier Foundation (EFF), which is challenging NSA intrusion into foreigners’ US-based email and social media accounts.

"Defendants are ordered not to destroy any documents that may be relevant to the claims at issue in this action, including the Section 702 materials," White wrote in the order.

White handed down the order shortly after EFF told the court that Department of Justice lawyers had told attorneys for some organizations challenging the surveillance that the government was continuing to destroy web evidence collected under Section 702 authority, all while “the erasure of so-called telephone metadata was being preserved indefinitely,” Politico reported.

"In communications with the government this week, plaintiffs learned to their surprise that the government is continuing to destroy evidence relating to the mass interception of Internet communications it is conducting under section 702 of the Foreign Intelligence Surveillance Act,” EFF lawyers wrote in a motion. “This would include evidence relating to its use of 'splitters' to conduct bulk interceptions of the content of Internet communications from the Internet 'backbone'network of AT&T."

"Once again, the government has apparently secretly and unilaterally reinterpreted its obligations under the Court’s evidence preservation orders, without notice to the Court or to plaintiffs, and has determined that it need not engage in preservation of relevant evidence,” EFF added.

EFF asked White for a Friday hearing on the matter, requesting a temporary restraining order to block the eradication of the 702 evidence. White, based in San Francisco, did not immediately grant the hearing request, but did order the government to offer a written explanation of its stance on the destruction of evidence by 12:00 PST on Friday.

A Justice Department spokesman would not comment to Politico on the matter.

The US government has claimed Section 702 grants it the authority to collect a vast amount of foreign communication without specific court permission. In the process of sweeping large volumes of foreign data, information from US citizens is often collected.

The US claims it usually discards data of US citizens and permanent residents from surveillance reports before they are distributed, though these names are maintained and, at times, the information is disclosed.