A federal judge on Monday blocked a move by President Donald Trump's administration 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 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 Central American migrants 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.

"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 wrote in his ruling.

"The primary reason a nationwide injunction is appropriate is that it is the only means of affording complete relief," he added.

The White House issued a statement criticizing the judge's move and said it was counting on the Supreme Court, the nation's highest court, to issue a ruling.

"Immigration and border security policy cannot be run by any single district court judge who decides to issue a nationwide injunction," the White House said. "This ruling is a gift to human smugglers and traffickers and undermines the rule of law.

"We previously asked the Supreme Court to set aside the district court's injunction in its entirety, our request remains pending with the Court, and we look forward to it acting on our request."

The American Civil Liberties Union (ACLU), which argued against the administration's 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.