Washington (CNN) The Justice Department on Thursday sought to modify a federal court order that limits the ability of US officials to detain immigrant children longer than 20 days.

The move is part of the department's execution of President Donald Trump's new executive order designed to keep families together and will likely prove an uphill climb for Justice officials, as the request has already previously been denied under the Obama administration.

After an outcry against the Trump administration's separation of undocumented immigrant parents and children at the US border, the President reversed course on Wednesday by signing an order that aims to keep far more families together.

The crux of the legal issue that the Justice Department is now grappling with stems from a 1997 settlement agreement in Flores v. Reno and subsequent rulings limiting the detention of children to 20 days. Trump's executive order calls on Attorney General Jeff Sessions to request to modify the Flores settlement.

A Justice Department spokesman said, "Irrespective of the court's decision in Flores, it is incumbent for Congress to finally act to keep families together, end catch and release, and create the foundation for an immigration system that serves the national interest."

Justice Department lawyers want US District Judge Dolly Gee in California to modify that rule to give the Trump administration maximum flexibility to detain families -- not only until their criminal proceedings conclude, but also through the end of any asylum proceedings, which could potentially drag on for many months.

"Exemption from this requirement is tailored to address the immediate influx with which the Government is currently dealing, while providing time for ongoing efforts in Congress to address these issues," Justice Department lawyers wrote in Thursday's court filing. "Relaxing these requirements would permit family units to be kept together in appropriate facilities."

As part of its request, the DOJ asks the court to "exempt ICE family residential facilities from the Agreement's state licensure requirements," arguing that "these changes are justified by several material changes in circumstances -- including the worsening influx of families unlawfully entering the United States at the southwest border."

The court filing also states, "Under current law and legal rulings, including this Court's, it is not possible for the U.S. government to detain families together during the pendency of their immigration proceedings. It cannot be done."

Trump administration officials over the past week have regularly suggested their hands were tied under the Flores settlement and later court decisions.

"Pursuant to these court decisions, minors detained as part of a family unit cannot be detained in unlicensed facilities for longer than a presumptively reasonable period of 20 days, at which point, minors must be released or transferred to a licensed facility," according to a "Myth vs. Fact" statement provided by Homeland Security.

But that assertion leaves out the fact that "zero tolerance," the decision to prosecute 100% of illegal border crossings, presented the Trump administration with a policy choice: Keep families together, releasing them into the US on electronic monitoring, or split them apart. Trump chose to split the families at the border -- thereby complying with Flores by not detaining the children, but also prosecuting adults.

In 2015, Gee ruled that the Obama administration's extended detention of undocumented mothers and children had violated the Flores agreement -- setting up the court settlement that now imposes the 20-day limit on holding children with their families.

"The whole point of Judge Gee's decision was to avoid the prolonged and unnecessary detention of children,"said Stephen Legomsky, a former Obama administration DHS official. "Now that she's seen the level of suffering that an unfettered President has elected to inflict on children, I would imagine that if anything her resolve will be even stronger."

Bob Ferguson, the attorney general in Washington state, the same one who successfully sued over the travel ban, announced Thursday that he will lead a coalition of nine states to challenge the President's executive order.

Separately, three undocumented immigrants currently in detention who say they were separated from their children filed a federal lawsuit in DC Wednesday evening, seeking to be reunited with their children.