The Justice Department late Tuesday asked a federal judge in San Francisco to lift an order of his that blocks the Trump administration from enforcing tough new restrictions on asylum.

And if the judge doesn't act by Wednesday, the government said, it will ask the Ninth Circuit Court of Appeals to block the judge's order.

In its court filing, government lawyers said the judge undermined the president's efforts to encourage the people in the caravans transiting Mexico to follow U.S. law. Instead, the government said, the migrants, "rather than properly presenting themselves at a border port of entry, violate our criminal law and endanger themselves by crossing illegally into the country, as events have amply demonstrated."

On Nov. 9, as the migrants approached from Central America, President Donald Trump signed a proclamation that stopped the government from considering requests for asylum from anyone who crossed the US southern border illegally. Only asylum claims made at border checkpoints would be considered, it said.

"The continuing and threatened mass migration of aliens with no basis for admission," Trump said, "has precipitated a crisis and undermines the integrity of our borders."

An immigrant rights group immediately sued, and on November 19 Federal District Court Judge Jon S. Tigar ordered the administration to stop enforcing the new rules. He said President Trump's order violated existing federal law that requires the government to consider asylum requests from anyone who manages to get inside the US, no matter how an immigrant arrived. "He may not rewrite the immigration laws to impose a condition that Congress has expressly forbidden," Tigar wrote.

President Trump criticized Tigar's ruling, saying it came from "an Obama judge." It was that comment that produced a surprise rejoinder from Chief Justice John Roberts who said, "We do not have Obama judges or Trump judges, Bush judges or Clinton judges. What we have is an extraordinary group of dedicated judges doing their level best to do equal right to those appearing before them.

Tuesday's court filing said 396,579 immigrants were apprehended after crossing the border illegally in the past 12 months -- over 1,000 a day. "The executive branch is entitled to use every legal tool available to halt this dangerous and illegal practice," it said.