A federal judge Friday ruled that The National Archives and Records Administration (NARA) didn't do enough consideration before granting Immigration and Customs Enforcement (ICE) the ability to destroy records on sexual assault and death.

"NARA was required ... to consider the research value of the records in ICE’s Disposition Schedule, and it failed to meaningfully do so," read an opinion by Judge Amit P. Mehta, for the district court in Washington, D.C.

ICE had proposed 20-year retention periods for Death Review Files, as well as Sexual Abuse and Assault files, as well as requesting disposition authority for other records. 

When NARA issued a memo recommending approval for ICE's revised request in 2017, it "contained scant discussion of the research value of the records ICE sought to destroy," Mehta said.

WHITE HOUSE DECLINES TO CALL MIGRANT BORDER SURGE A 'CRISIS'

Mehta's decision ultimately sent back certain files to NARA for reconsideration and vacated its decision to approve them.

The decision marked a win for watchdog groups, like the plaintiff Citizens for Responsibility and Ethics in Washington (CREW), that sought to maintain the documents for research.

CLICK HERE TO GET THE FOX NEWS APP

"This is an incredible ruling for transparency," said CREW President Noah Bookbinder. "To destroy records revealing abuse, rights violations and even deaths in detention would further obscure a system already severely lacking in oversight and transparency. There have been too many abuses documented in our immigration detention system, but the country cannot fix these problems without knowing what has happened."

When reached, ICE deferred to NARA, which did not immediately provide comment.