CHICAGO (CBS/AP) — Illinois Attorney General Kwame Raoul is joining 18 other states and the District of Columbia in a lawsuit against the Trump administration’s efforts to eliminate limits on how long migrant children can be kept in detention.

“The federal government is tearing children apart from their families and now wants to strip away protections these children have while in detention,” Raoul said. “Every American should be outraged by our government’s treatment of migrant children at the border, and I am proud to continue to stand with my counterparts to fight for their health and welfare.”

A 1997 agreement known as the Flores settlement requires immigrant children be kept in the least restrictive setting and generally shouldn’t spend more than 20 days in detention.

Last week, the Trump administration announced it’s planning new regulations that would keep families detained longer. A judge must approve those changes.

Under the administration’s rule, which will be published in the Federal Register Friday and would go into effect 60 days later, there would not be a limit to the number of days families with children could be detained. But officials acknowledged that court challenges will likely delay the implementation of the regulation, which also needs to be approved by the federal judge overseeing the Flores litigation.

In a briefing Wednesday, Acting Homeland Security Secretary Kevin McAleenan said there is “no intent” to hold families for “a very long time,” and vowed that the U.S. government would treat migrant children with “dignity, respect and special concern in concert with American values.” He suggested that if cases involving detained families could be adjudicated at the same pace they were in 2015, they’d be in custody for an average of about 50 days.

Raoul and attorneys general from 18 other states and the District of Columbia – all Democrats – are seeking to block the new rule, arguing it would interfere with states’ ability to ensure the health and safety of immigrant children, by undermining individual states’ licensing requirements for the facilities where the children are held.

“We wish to protect children from irreparable harm,” California Attorney General Xavier Becerra said.

A judge must OK the Trump administration’s proposed changes in order to end the Flores settlement, and a legal battle is expected from the case’s original lawyers.

It’s not likely that U.S. District Court Judge Dolly Gee would approve the changes; it was her ruling in 2015 that extended the application of the Flores agreement to include children who came with families. She ordered the Obama administration to release children as quickly as possible.

Still, Becerra argued California has a role to play in the case because the state is home to so many immigrants.

“The federal government doesn’t have a right to tell us how we provide for the well-being of people in our state,” he said.

California does not have any detention centers that house migrant families. The Trump administration argued that because no states license federal detention centers, they wanted to create their own set of standards in order to satisfy the judge’s requirements that the facilities are licensed.

They said they will be audited, and the audits made public. But the Flores attorneys are concerned that they will no longer be able to inspect the facilities, and that careful state licensing requirements will be eschewed.

Becerra echoed that argument, saying that removing state authority over licensing centers could allow the federal government to place centers in California or other states that don’t meet basic standards of care.

Attorney General Bob Ferguson of Washington said prolonged detention will have long-term impacts on the mental and physical health of immigrant children and families.

“When we welcome those children into our communities, state-run programs and services bear the burden of the long-term impact of the trauma those children endured in detention,” he said.

California on Monday also sought to halt a Trump administration effort that could deny green cards to immigrants using public benefits.

(© Copyright 2019 CBS Broadcasting Inc. All Rights Reserved. The Associated Press contributed to this report.)