A U.S. judge on Friday refused to immediately allow the Trump administration to enforce a ban on asylum for any immigrants who illegally cross the U.S.-Mexico border.

Judge Jon Tigar rejected the Justice Department's request to suspend his earlier order temporarily blocking the ban. The administration had still not shown that the ban was legal, or that any harm would come from continuing to implement existing immigration laws, Tigar said in his order.

"Nor have Defendants rebutted the significant harms that will be suffered by asylum seekers with legitimate claims and the organizations that assist them," he said.

An email to a spokesman for the Justice Department was not immediately returned.

At issue is President Donald Trump's Nov. 9 proclamation that barred anyone who crossed the U.S.-Mexico border between official ports of entry from seeking asylum. Trump issued the proclamation in response to caravans of migrants approaching the border.

Tigar on Nov. 19 sided with legal groups who argued that federal law is clear that immigrants in the U.S. can request asylum regardless of whether they entered legally.

The president "may not rewrite the immigration laws to impose a condition that Congress has expressly forbidden," the judge said in his order.

The ruling led to an unusual public dispute between Trump and Chief Justice John Roberts after Trump dismissed Tigar — an appointee of Trump's predecessor — as an "Obama judge."

Roberts responded with a statement that the federal judiciary doesn't have "Obama judges or Trump judges, Bush judges or Clinton judges."

The administration has indicated it will appeal Tigar's ruling, but it still wanted the judge to halt the restraining order. Tigar's order undermined the White House's efforts to "encourage the large number of aliens transiting Mexico ... to simply follow our laws," the Justice Department said in its request for a stay.

The request came after U.S. authorities on Sunday fired tear gas at hundreds of migrants after some of them tried to get through a fence separating the two countries. In its request for a stay, Justice Department lawyers said the president's asylum move was well within his authority to "address a major crisis," and they cited "recent events" as evidence the migrants were endangering themselves, any children traveling with them and U.S. law enforcement authorities.

The American Civil Liberties Union and other groups challenging the asylum ban shot back in a court filing that Tigar's decision to issue the temporary restraining order was correct and the government offered "no legitimate new reason to revisit it."

"We are pleased the district court continues to recognize the harm that will occur if this illegal policy goes into effect," Lee Gelernt, an attorney for the ACLU, said in a statement on Friday.