A federal judge in the United States has barred President Donald Trump’s administration from refusing asylum to immigrants who cross the country’s southern border illegally, reported AP on Tuesday.

District Judge Jon S Tigar issued a temporary restraining order after hearing arguments made by the American Civil Liberties Union and the Center for Constitutional Rights. The two organisations had sued the president after he issued a ban following the movement of thousands of migrants from central America towards the US border.

On November 9, Trump issued a proclamation that migrants who crossed the border “unlawfully or without proper documentation” would be ineligible for asylum.

“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.”

Lawyer for American Civil Liberties Union Lee Gelernt said that some people seeking asylum cross between official ports because “they’re in real danger” in their respective countries 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.

Around 3,000 people from the first of the caravan of migrants have arrived in Mexico’s Tijuana across the border from San Diego in California. As of Monday, 107 people detained at official border crossings have sought asylum since Trump proclamation came into effect, according to the Department of Homeland Security.

Homeland Security said asylum seekers at the southern border should appear at an official border crossing. But several border crossings like San Ysidro have long wait times and people are often forced to wait in shelters or outdoor camps on the Mexican side.