WASHINGTON (AP) — The Department of Homeland Security is moving to end a long-standing federal court agreement that limits how long immigrant children can be kept in detention.

That's according to two DHS officials who spoke to the AP on condition of anonymity to discuss regulations not made public. They could come as early as this week.

The move is almost certain to spark a new court fight over the government's ability to hold families until their cases are decided.

The so-called Flores agreement requires the government to keep children in the least restrictive setting possible and to release them generally after 20 days in detention.

Because of those restrictions, migrant families coming into the country have been released into the U.S. while their asylum requests wind their way through the courts.