HOUSTON (AP) — A federal judge barred the Trump administration on Monday from refusing asylum to immigrants who cross the southern border illegally.

U.S. District Judge Jon S. Tigar issued a temporary restraining order after hearing arguments in San Francisco. The request was made by the American Civil Liberties Union and the Center for Constitutional Rights, which quickly sued after President Donald Trump issued the ban this month in response to the caravans of migrants that have started to arrive at the U.S.-Mexico border.

Trump issued a proclamation on Nov. 9 that said anyone who crossed the southern border would be ineligible for asylum. The regulations, which will remain in place for three months absent a court order, could potentially make it harder for thousands of people who enter the U.S. to avoid deportation.

“Individuals are entitled to asylum if they cross between ports of entry,” said Baher Azmy, a lawyer for the Center for Constitutional Rights. “It couldn’t be clearer.”

In recent years, tens of thousands of immigrants each year have shown up in the Arizona desert or on the north bank of the Rio Grande in Texas, surrendered to immigration agents and requested asylum. The Department of Homeland Security estimates around 70,000 people a year claim asylum between official ports of entry.

Trump has argued that the recent caravans are a threat to national security.

Around 3,000 people from the first of the caravans have arrived in Tijuana, Mexico, across the border from San Diego, California. U.S. Customs and Border Protection said Monday that it closed off northbound traffic for several hours at the San Ysidro crossing. It has also installed movable, wire-topped barriers, apparently to stop a potential mass rush of people.

As of Monday, 107 people detained between official crossings have sought asylum since Trump’s order went into effect, according to DHS, which oversees Customs and Border Protection. Officials didn’t say whether those people’s cases were still progressing through other avenues left to them after the proclamation.

DHS has said it wants asylum seekers at the southern border to appear at an official border crossing. But many border crossings such as San Ysidro already have long wait times. People are often forced to wait in shelters or outdoor camps on the Mexican side, sometimes for weeks.

ACLU lawyer Lee Gelernt said that some people seeking asylum cross between official ports because “they’re in real danger,” either in their countries of origin or in Mexico.

“We don’t condone people entering between ports of entry, but Congress has made the decision that if they do, they still need to be allowed to apply for asylum,” he said.

___

Associated Press journalists Jill Colvin and Colleen Long in Washington contributed to this report.