WASHINGTON (CN) – The Justice Department on Thursday asked a federal judge to change the rules regarding the detention of immigrant families who enter the country illegally, seeking permission to detain them for longer than 20 days in an effort to keep children with their parents.

A 1997 settlement in a California case, Flores v. Reno, mandates that families cannot be detained longer than 20 days. But an executive order signed by President Donald Trump on Wednesday potentially runs afoul of that settlement.

Trump said families entering the country illegally will be prosecuted to the fullest extend of the law — proceedings that can take months or even years — and the families will be kept together for the duration.

Trump’s enforcement of his hard-line immigration policies have resulted in the separation of more than 2,300 children from their families in recent weeks.

The Justice Department’s filing asks U.S. District Judge Dolly Gee, who approved the Flores settlement, to allow for longer detentions.

“The circumstances created by this application of the agreement have become untenable… family crossings away from legal ports of entry nearly doubled in FY2016,” the DOJ said in a written statement Thursday.

“Tens of thousands of families are embarking on the dangerous journey to the United States, often through smuggling arrangements and then crossing the border illegally in violation of our federal criminal law,” the Justice Department said. “And as the government has previously stated, once those families are released into the interior, a vast segment fail to appear at their immigration hearings.”

The Justice Department also asserts that the Flores settlement has eliminated all “practical availability” of family detention centers across the U.S.

“Thus creating powerful incentives for aliens to enter this country with children in violation of our criminal and immigration laws and without a valid claim to be admitted to the United States,” the Justice Department said.

The government is asking Gee to “exempt [the Department of Homeland Security] from the Flores settlement agreement’s release provisions so that ICE may detain aliens who have arrived with their parent or legal guardian together in ICE family residential facilities.”

It also seeks an exemption for ICE family residential facilities from any state licensure requirements.

“The government is not asking to be relieved from the substantive language of the agreement on the conditions of detention in these facilities. The government asks for immediate relief, along with a schedule to allow the parties to more fully address the issues raised by this request,” the filing says.

As the request was being filed Thursday, first lady Melania Trump set off a firestorm online before boarding a plane to visit a detention center for immigrant children in Texas.

As she boarded a plane for Texas, the first lady was photographed wearing a jacket with the words “I really don’t care, do u?” emblazoned across the back.

Later, Trump’s spokesperson, Stephanie Grisham, told reporters there was “no hidden message” behind Trump’s fashion choice.

“After today’s important visit to Texas, I hope this isn’t what the media is going to chose to focus on,” Grisham said.

On Thursday afternoon the American Judges Association said while it was “heartened” by the administration’s decision not to continue separating the families of illegal aliens, it is imperative that already separated families be “immediately reunited.”

“The [association,] as the voice of the judiciary, also requests our nation’s leaders and lawmakers to provide permanent assurances that this policy is never implemented again,” a statement from the organization said.

It also emphasized the need to provide due process and “stability and safety” for children torn from their parents.

“Putting them in group enclosures is the opposite of what children need,” the judges wrote. “It is so traumatizing that we fear many of these children may never recover.”

The judges also took issue with Attorney General Jeff Sessions’ recent ruling that people fleeing domestic violence may not seek asylum.

This has “piled trauma upon trauma by causing removal of children from domestic violence victims asking for asylum,” the judge’s said.

Immigration judges are not independent administrative law judges, though they are subject to the executive branch. Session’s ruling “ties the hands of immigration judges,” the group said.

“The United States has always been a beacon for those who believe every human being has basic, fundamental rights … we urge the immediate reunification of these children and their parents, the permanent cessation of the separation practice, the restoration of asylum status for domestic violence victims, and prompt reform of the immigration system deficiencies,” the statement said.