The Trump administration on Wednesday plans to end a legal “loophole” that has allowed illegal-immigrant families to enter the U.S., according to reports.

The action would replace a court order known as the Flores Settlement that has helped create a “catch and release” policy regarding immigrant families.

Under the new planned policy, migrant families could be detained together while immigration judges consider their cases, instead of being released after 20 days, as stipulated under Flores.

BORDER PATROL NABS NEARLY 200 CENTRAL AMERICAN MIGRANTS NEW NEW MEXICO PORT OF ENTRY

​​​​​​​Immigrants play soccer at the U.S. government's holding center for migrant children in Carrizo Springs, Texas, July 9, 2019. (Associated Press)

“President Trump has made it clear that he’s going to secure America’s border at all cost and this rule plays a vital role in the strategy to restore the integrity to our immigration system and our national security,” an administration official told the Washington Times.

“President Trump has made it clear that he’s going to secure America’s border at all cost and this rule plays a vital role in the strategy to restore the integrity to our immigration system and our national security.”

— Trump administration official

New national standards for detention housing for families will be part of the plan, the Daily Caller reported.

The Flores Settlement refers to a 1980s case in which a girl named Jenny Flores, then 15, was detained with adults by U.S. authorities after she fled El Salvador. Beginning in 1997, the Flores Settlement called for migrant children to be sent to care programs after 20 days, and be given access to medical treatment and visits with relatives.

In July, at a House Oversight Committee hearing on Capitol Hill, Rep. Rashida Tlaib, D-Mich., accused acting Homeland Security Secretary Kevin McAleenan and other administration officials of seeking to scrap the Flores Settlement, with the alleged goal "to keep kids longer" in custody.

McAleenan pushed back against that characterization. He explained that he wanted to keep families together for the time necessary it takes for immigration proceedings to go through, and for the justice system to make a ruling on the case.

CLICK HERE TO GET THE FOX NEWS APP

“We don't want to change the provisions about conditions in our custody. We want to codify those provisions to maintain the highest possible standard,” he said, adding: "We want to keep families together through an immigration proceeding that's fair and expeditious in an appropriate setting. That can't be done in 20 days with due process."

Democrats have slammed the detentions as "inhumane," while many Republicans have accused the Democrats of hypocrisy, saying they were silent about similar detentions under the Obama administration.

Fox News’ Frank Miles contributed to this story.