A Central American migrant with his child, Tijuana, Mexico

A federal judge has blocked Donald Trump from removing the right to asylum for immigrants who cross the US-Mexico border.

Judge Jon Tigar issued a temporary restraining order late Monday after hearing arguments in San Francisco, California. The American Civil Liberties Union and the Center for Constitutional Rights sued after Trump issued the ban earlier this month.

As part his anti-immigrant rhetoric before the November 6 Congressional elections, Trump said he would withdraw the right to asylum for those in a caravan of migrants moving through Mexico towards the US border. Three days after the elections, he issued his proclamation, effective for three months absent a court order.

Immigrants have the right to seek asylum at a US port of entry. The Trump Administration, as part of its “zero tolerance” policy instituted in April, has tried to prevent border-crossers from reaching a port of entry or to turn them away on the grounds that the ports are over capacity.

The Department of Homeland Security estimates that 70,000 people claim asylum each year between ports of entry. It said 107 people detained between official crossings have sought asylum since Trump’s order.

About 3,000 people from the first of the Central American migrant caravans have arrived in Tijuana, Mexico, across the border from San Diego, California. US Customs and Border Protection said Monday that it closed northbound traffic for several hours at the San Ysidro crossing, and that it has installed movable, wire-topped barriers.

In October, Trump ordered 5,800 troops to the US-Mexico border, but they are in southern Texas, hundreds of miles from Tijuana.

The Army general in charge of the mission said Monday that he wants to begin redeploying some of the troops. Some have spent days stringing miles of barbed concertina wire, while others have said that they spent days waiting for assignments.

Lt. Gen. Jeffrey Buchanan told Politico that redeployment will probably focus first on soldiers involved in logistics.

“Now that things are set down here, we don’t need as many troops to actually build base camps and things like that, because the base camps are built,” the general said.