(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.

Read More