A US federal judge on Monday blocked a Trump administration move that would have prevented most Central American migrants from seeking asylum at the US border.
The ruling by District Court Judge Jon Tigar is the latest setback for President Donald Trump's immigration policies, which have been the subject of numerous court challenges.
The Trump administration in July required migrants seeking asylum in the United States to make their request in a country along their route, effectively banning them from doing so at the US border.
The policy is among a host of measures Trump has taken in a bid to stem the flow of migrants from Central America trying to cross into the US from Mexico and request asylum.
Tigar, a District Court judge for the Northern District of California, issued a nationwide injunction against the move, meaning it applies to states other than just California.
"The effect of the Rule is to categorically deny asylum to almost anyone entering the United States at the southern border if he or she did not first apply for asylum in Mexico or another third country," Tigar said.
"The primary reason a nationwide injunction is appropriate is that it is the only means of affording complete relief," he added.
The American Civil Liberties Union (ACLU), which argued against the administration move, welcomed the judge's ruling.
"The court recognized there is grave danger facing asylum-seekers along the entire stretch of the southern border," said ACLU attorney Lee Gelernt.
Melissa Crow, an attorney with the Southern Poverty Law Center, said the ruling "levels the playing field for all the vulnerable individuals and families seeking refuge in the United States.
"With this decision, regardless of where they cross the border, these people should be able to seek asylum," Crow said.
"Sadly, while this ruling removes a major hurdle, far too many obstacles remain, as this administration's war on asylum-seekers appears to know no bounds," Crow added.