The Trump administration is proposing to lift court-imposed limits on how long it can hold children in immigration detention.

Under proposed regulations set to be published in the Federal Register on Friday, the administration seeks to replace the Flores settlement, a decades-old agreement that dictates how long the government can hold migrant children, and under what conditions.

The administration wants to detain migrant families together for as long as their immigration cases are pending. The proposed regulations will satisfy the "basic purpose" of Flores, the administration argues, by making sure that children are treated with "dignity, respect, and special concern for their particular vulnerability as minors."

"Today, legal loopholes significantly hinder the Department's ability to appropriately detain and promptly remove family units that have no legal basis to remain in the country," said Homeland Security Kirstjen Nielsen in a statement.

The proposed changes are expected to face legal challenges. Federal Judge Dolly Gee, who oversees the Flores settlement, recently rejected a separate attempt by the administration to detain children in jail-like settings for more than 20 days.

Under the Flores settlement, decided in 1997 and modified in 2015, immigrant minors can't be held in jail-like settings, and can't be held for longer than 20 days. The Justice Department had asked the federal court for permission "to detain alien families together throughout the pendency of criminal proceedings for improper entry or any removal or other immigration proceedings."

But Judge Gee rejected that request. "It is apparent that Defendants' Application is a cynical attempt," she wrote, "to shift responsibility to the Judiciary for over 20 years of congressional inaction and ill-considered Executive action that have led to the current stalemate."

The move comes just months after the Trump administration attempted to discourage illegal immigration by separating migrant families at the border, but then backed down because of the resulting uproar. As of last week, nearly 500 children were still in government-run shelters, which are not detention centers, without their parents.

Copyright 2018 NPR. To see more, visit http://www.npr.org/.