For indispensable reporting on the coronavirus crisis, the election, and more, subscribe to the Mother Jones Daily newsletter.

In a major victory for asylum-seekers, a federal judge blocked the Trump administration’s ban on asylum for people fleeing persecution who cross the US border illegally.

Three days after the midterm elections, President Donald Trump barred people who enter the country between official ports of entry from receiving asylum. It was an aggressive attempt to override Congress: US law explicitly protects people’s right to seek asylum regardless of how they enter the country.

Jon Tigar, a district court judge in California, ruled that Trump’s asylum ban “irreconcilably conflicts” with immigration law and the “expressed intent of Congress.” He wrote that the ban puts asylum-seekers at increased risk of violence and will cause many people with valid asylum claims to be ineligible for protection. Tigar’s ruling blocks the asylum ban temporarily, until the case is heard again next month. His temporary restraining order took effect immediately and came just 12 hours after he heard arguments from both sides.

The decision was not surprising. US immigration law unambiguously states that people in the United States can seek asylum “whether or not” they enter “at a designated port of arrival.” Trump tried to get around that by relying on a law that lets presidents keep out foreigners they believe would be “detrimental to the interests of the United States,” the same authority Trump used to issue his travel ban against mostly majority-Muslim nations.

Trump is effectively claiming he can override Congress whenever he sees fit on immigration. As Lee Gelernt, the American Civil Liberties Union’s lead lawyer in the case, told The New Yorker last week, “It would mean the President could literally sit down with a copy of the immigration act that Congress wrote and cross out any provision he didn’t like.” Tigar wrote in his decision, “Whatever the scope of the President’s authority, he may not rewrite the immigration laws to impose a condition that Congress has expressly forbidden.”

Jon Tigar ruled that Trump’s asylum ban “irreconcilably conflicts” with immigration law and the “expressed intent of Congress.”

The Trump administration argued that even if Congress said asylum-seekers who cross the border without authorization are eligible to apply for asylum, the government can use their illegal entry to make them ineligible for protection. “The argument strains credulity,” Tigar wrote. “To say that one may apply for something that one has no right to receive is to render the right to apply a dead letter. There simply is no reasonable way to harmonize the two.”

The Trump administration reportedly believes the Supreme Court will ultimately allow its asylum ban to go into effect. The court upheld Trump’s travel ban earlier this year by citing the president’s “broad discretion” to block foreigners. But there is reason to be skeptical that it would rule in Trump’s favor again. The court assumed in the travel ban case that the president does not have the power to “expressly override particular provision[s]” of immigration law. Either way, the administration will almost certainly have to go through the progressive Ninth Circuit Court of Appeals first, and the asylum ban will likely be blocked for months, if not longer.

The administration said it was using the ban to push more people to go to official ports of entry. But there is now a months-long line to request asylum at the San Diego border crossing, where members of the Central American migrant caravan vilified by Trump are waiting. The administration has known about the lines for months and has shown little interest in reducing them.

US Customs and Border Protection, which manages the ports of entry, has been sharing videos of its officers training in riot gear to repel imaginary invaders and just bought additional riot gear after making an “urgent” request for bids. It has shown none of that urgency when it comes to increasing capacity to process asylum claims. In Yuma, Arizona, CBP has gone from letting in 30 or more families per day to one at most in the past two weeks, the Wall Street Journal reported.

The asylum ban reinforces a misleading division between people who request protection the “right way” and those who do so “illegally.” Many asylum-seekers are not aware that they can seek protection at ports of entry, and they actively seek out Border Patrol agents once they are in the United States. Smugglers often do not give migrants the option of going to a port of entry, which can take weeks or months longer due to the backlog. The Department of Homeland Security’s inspector general found in September that the wait times likely led families to cross the border illegally and risk separation before Trump ended his family separation policy in June.

The case against the government was brought by the ACLU, the Southern Poverty Law Center, and the Center for Constitutional Rights. The plaintiffs and the government will be in court again on December 19 to argue whether Tigar should continue to block the asylum ban by issuing a preliminary injunction, rather than a temporary restraining order.

In a statement issued after Tigar’s decision, the ACLU’s Gelernt reiterated that the ban was illegal and put asylum seekers’ lives at risk. “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. “Congress has been clear on this point for decades.”