Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

A federal judge on Friday ruled that the Trump administration was again violating a longstanding agreement that compels the government to release migrant children detained at the border within 20 days and ordered the minors be released.

Plaintiffs represented by the Center for Human Rights and Constitutional Law have been challenging the child detention policies of the administration of President Donald Trump in Los Angeles federal court, where they've alleged the coronavirus crisis has caused further delays in the mandated release of migrant children.

The challenges are being waged under a 1997 settlement between immigrant advocates and the government known as the Flores agreement. It generally requires children detained at the border and kept in nonlicensed facilities to be released within weeks.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Los Angeles-based U.S. District Court Judge Dolly Gee oversees the settlement and issued a mixed ruling to enforce the Flores agreement and again ordered the government to "expedite the release" of children in its custody.

"This court order could very well prevent hundreds of children from becoming seriously ill with COVID-19 infection, and may even save some children’s lives," longtime plaintiffs' attorney Peter Schey said by email. "On behalf of the 5,000 detained children we represent, we are deeply grateful for the court’s humane order."

The Flores agreement has faced multiple challenges since the Trump administration in 2018 enacted a policy of separating family members at the border as a means of dissuading illegal crossings. The administration backed down but was slow to reunite children when their parents.

Plaintiffs alleged the U.S. Office of Refugee Resettlement stopped releasing children to parents, relatives or potential guardians in New York, California and Washington to avoid becoming entangled in those states' stay-at-home rules during the pandemic.

They also argued the government was dragging its feet by halting the release process for some children because parents, relatives and potential guardians couldn't easily be fingerprinted for background checks.

Plaintiffs said delays endangered children as the virus could spread in detention facilities, citing a nonprofit facility in Texas "placed under a 14-day quarantine order," according to Friday's ruling.

They also alleged that a teen turned 18 during "quarantine" and was released to ICE rather than going to a family placement program "already secured for him."

Gee did not agree with all those claims. But she concluded: "ORR and ICE shall continue to make every effort to promptly and safely release" children represented by plaintiffs.