(CNN) In an order laced with language accusing President Donald Trump of attempting to rewrite immigration laws, a federal judge based in San Francisco temporarily blocked the government late Monday night from denying asylum to those crossing over the southern border between ports of entry.
Judge Jon S. Tigar of the US District Court for the Northern District of California said that a policy announced November 9 barring asylum for immigrants who enter outside a legal check point '"irreconcilably conflicts" with immigration law and the "expressed intent of Congress."
"Whatever the scope of the President's authority, he may not rewrite the immigration laws to impose a condition that Congress has expressly forbidden," Tigar wrote, adding that asylum seekers would be put at "increased risk of violence and other harms at the border" if the administration's rule is allowed to go into effect.
The Department of Homeland Security and Justice Department slammed the ruling and the lawsuit, calling them both "absurd."
"Our asylum system is broken, and it is being abused by tens of thousands of meritless claims every year. ... It is absurd that a set of advocacy groups can be found to have standing to sue to stop the entire federal government from acting so that illegal aliens can receive a government benefit to which they are not entitled," Homeland Security spokeswoman Katie Waldeman and Justice Department spokesman Steven Stafford said in a statement.
The temporary restraining order is effective nationwide and will remain in effect until December 19, when the judge has scheduled another hearing, or further order of the court.
The order is the latest setback for the administration that has sought to crack down on what it says are flaws in the immigration system, and it is a victory for the American Civil Liberties Union, the Southern Poverty Law Center and other groups who argued it is illegal to block someone based on how they entered the country.
Now a key question looms: What impact will the judge's decision have in the coming days at the US-Mexico border, where Trump has deployed thousands of troops as large groups of migrants seeking asylum head toward the United States?
More than 2,000 Central American migrants arrived in the border city of Tijuana in recent days, and about 3,000 more migrants are estimated to be in Mexicali, Mexico, another border city about 100 miles away, UN High Commissioner for Refugees spokeswoman Francesca Fontanini said.
In recent days, administration officials have maintained that there is a crisis at the border and that abuses in asylum claims forced them implement new measures.
Immigrant rights groups, who argue the administration is creating a crisis at the border to score political points, praised the judge's ruling.
"This is a critical step in fighting back against President Trump's war on asylum seekers," said Melissa Crow, senior supervising attorney at the Southern Poverty Law Center.
In their lawsuit, immigrants advocates argued it was illegal to block someone from seeking asylum based on how they entered the country, and that the Trump administration also violated the Administrative Procedure Act by not providing public notice or comment on its new asylum rule.
"This ban is illegal, will put people's lives in danger and raises the alarm about President Trump's disregard for separation of powers," said Lee Gelernt, deputy director of the ACLU's Immigrant Rights Project and the lead attorney in the case.
"There is no justifiable reason to flatly deny people the right to apply for asylum, and we cannot send them back to danger based on the manner of their entry," he said.
The Justice Department and the Department of Homeland Security argued that the President has the right to suspend entry by individuals into the United States if he determines it to be in the national interest.
"As the Supreme Court affirmed this summer, Congress has given the President broad authority to limit or even stop the entry of aliens into this country. Further, asylum is a discretionary benefit given by the Executive Branch only when legal conditions are met and a favorable exercise of discretion is warranted," Waldman and Stafford said in the joint statement from the departments. "It is lawful and appropriate that this discretionary benefit not be given to those who violate a lawful and tailored presidential proclamation aimed at controlling immigration in the national interest.
Following the ruling, some top Democrats called on the Trump administration to work with Congress on immigration reforms.
"Once again, the courts have been forced to step in and preserve the rule of law. No one, including the President, can rewrite the nation's immigration laws on their own," Reps. Jerrod Nadler, the top Democrat on the House Judiciary Committee, and Zoe Lofgren, the top Democrat on the Subcommittee on Immigration and Border Security, said in a joint statement.
Earlier this month, the President issued a proclamation referring to "large, organized groups" who were traveling through Mexico and "reportedly intend to enter the United States unlawfully or without proper documentation and to seek asylum."
It said that those seeking entry can only do so temporarily at recognized ports of entry to allow for "orderly processing" and denied entry to those at any other location along the southern border.
"But aliens who enter the United States unlawfully through the southern border in contravention of this proclamation will be ineligible to be granted asylum," the President wrote.
"The arrival of large numbers of aliens will contribute to the overloading of our immigration and asylum system and to the release of thousands of aliens into the interior of the United States," the proclamation read.