Washington (CNN) The Trump administration on Wednesday announced a proposal to detain undocumented families together indefinitely, replacing the agreement that set a 20-day limit for holding children , with President Donald Trump saying it would discourage migrants from coming to the US.

The rule, unveiled by acting Homeland Security Secretary Kevin McAleenan, is part of the administration's aggressive effort to revamp immigration laws as the number of families and unaccompanied minors crossing the US-Mexico border has increased.

In recent months, the administration has proposed rules that could make it more difficult for immigrants to get green cards, worked to end temporary protected status for migrants from certain countries and limit avenues to declare asylum

Trump said Wednesday that he's concerned about the number of undocumented children attempting to travel into the United States, arguing the new rule would keep families together.

"I have the children on my mind. It bothers me very greatly," Trump said.

Trump also reasserted his false claim that President Barack Obama was the person responsible for family separations, although it was the Trump administration's "zero-tolerance" policy which led to thousands of children being separated from their parents after crossing the border illegally.

"I'm the one that kept the families together. With what we're doing now, we'll do even more of that, but it will make it almost impossible for people to come into our country illegally," Trump said at the White House.

Under what is known as the Flores settlement, the government is required to release a minor from a non-licensed facility as expeditiously as possible, which has been set at 20 days.

"By closing this key loophole in Flores, the new rule will restore integrity to our immigration system and eliminate the major pull factor fueling the crisis," McAleenan said at a news conference Wednesday.

The proposal would give the government new licensing authority, allowing the use of either a state license or Immigration and Customs Enforcement detention standards, according to a DHS official, meaning families can be kept longer than 20 days.

Lawsuits and Democratic opposition

The regulation is certain to face legal challenges and must also be examined by the judge who oversees the Flores settlement. It will take effect 60 days after it is formally published later this week, barring other legal delays.

Attorneys for migrant children detained by the government plan to file a brief with US District Judge Dolly Gee, arguing that the regulations fail to implement the settlement and therefore should be blocked, according to Peter Schey, president of the Center for Human Rights and Constitutional Law.

"This effort puts on full display President Trump's callous indifference to the health and safety, indeed even the lives, of detained minor children," Schey said in part, adding that the administration's plan "is certainly to detain migrant children as long as it wishes" without adhering to "well-established standards for the conditions of confinement of minors."

"This is yet another cruel attack on children, who the Trump administration has targeted again and again with its anti-immigrant policies," said Madhuri Grewal, policy counsel for the American Civil Liberties Union. "The government should not be jailing kids, and certainly shouldn't be seeking to put more kids in jail for longer."

Democratic lawmakers blasted the proposal, with Senate Minority Leader Chuck Schumer saying, "the cruelty of the Trump administration knows no bounds."

"Make no mistake: this new rule is about letting President Trump and Stephen Miller keep children in awful conditions for longer periods of time and continue the administration's horrid treatment of innocent migrant families fleeing unthinkable hardship," said Schumer in a statement.

Democratic presidential contender Beto O'Rourke tweeted that the President's "solution" to children separated from parents, deaths in custody and sleeping on concrete floors, is "to cage them for longer."

"The cruelty will only get worse -- until we end it," he tweeted in part.

Family residential centers

Responding to questions about when the new rule will be rolled out, McAleenan acknowledged that the administration will likely face litigation before adding that they hope to implement it as soon as possible which could mean eliminating the Flores settlement agreement.

"We are not going to be detaining every family unit that arrives starting tomorrow," McAleenan said.

McAleenan said that there are three family residential centers with what he described as "campus-like settings" with medical, educational and private housing facilities. The acting secretary said that detained families will have access to indoor and outdoor entertainment, legal counsel, translation services and medical care -- including any immunizations their children might need for later admission to US public schools.

"The facilities that we will be using to temporarily house families under this rule are appropriately, fundamentally different than the facilities where migrants are processed following apprehension or encounter at the border," McAleenan said.

There has been a major influx of families and children apprehended at the southern border in recent months. Already this year, more than 430,000 family members have been arrested for crossing the southern border illegally, compared to around 100,000 for all of last year.

This story has been updated.