The Department of Justice filed a request Thursday to modify a 1997 order that limits the amount of time children can be detained in an attempt to end family separations at the border.

After an outpouring of criticism over the separation of children from their families who illegally enter the U.S., President Trump signed an executive order Wednesday to end the controversial practice.

However, the executive action conflicts directly with a 1997 order known commonly as the Flores Agreement that states that children cannot be detained for longer than 20 days with adults.

In an attempt to avoid potential lawsuits, the DOJ filed a motion Thursday to “provide limited exemption” from the agreement, while Congress draws up a more suitable and long term solution.

“This Court should provide limited emergency relief in two respects. First, the Court should provide a limited exemption from its construction of the Flores Settlement Agreement's release provisions so that ICE may detain alien minors who have arrived with their parent or legal guardian together in ICE family residential facilities,” a press release from the DOJ read.

TRUMP SIGNS EXECUTIVE ORDER TO STOP FAMILY SEPERATION AT BORDER

The second modification asks the Court to exempt ICE family residential facilities from “state licensure requirements.”

While only a short term solution, the DOJ requested the changes because circumstances have changed since the original order was filed.

“These changes are justified by several material changes in circumstances--including the ongoing and worsening influx of families unlawfully entering the United States at the southwest border,” the statement said.

The Flores Agreement dates back to several lawsuits that were filed against the U.S. government over the treatment of unaccompanied minors under its care.

The final order in 1997 required that children only be released to their parents or legal guardian and that they be placed in the least restrictive conditions. These stipulations that have become a major factor in family separations at the border.

Trump has said that it is loopholes like this that make proper immigration reform impossible and the government is simply enforcing the laws as they are.

WATCH: EXECUTIVE IMMIGRATION ORDER: WHY DEMS ARE SLAMMING TRUMP

With Congress unable to come to a quick fix, the president has stepped in to resolve the family separations. In addition to Wednesday’s executive order, Trump held a Cabinet meeting at the White House to further discuss immigration reform.

Fox News also learned Thursday from two defense officials that the Pentagon will support an HHS request to find housing and supply bedding for 20,000 migrant children.

It remains unknown where the children will be based.

Fox News' Berger Judson, Lucas Tomlinson, John Roberts and Andrew O’Reilly contributed to this report.