US President Donald Trump has lashed out over a judge blocking his administration's policy of returning asylum seekers to Mexico while they apply to legally stay in the United States, saying the ruling is "unfair to the US".

Key points: Judge Richard Seeborg granted a request from asylum seekers and advocacy groups to halt the practice while their lawsuit progresses

Judge Richard Seeborg granted a request from asylum seekers and advocacy groups to halt the practice while their lawsuit progresses The government policy does not do enough to ensure migrants do not face "undue risk to their lives or freedom" in Mexico, the judge said

The government policy does not do enough to ensure migrants do not face "undue risk to their lives or freedom" in Mexico, the judge said The judge held off enforcing his decision to give the Government a chance to ask an appeals court for a review

Under the policy, which was launched in January, migrants are forced to return back over the border while they wait for an immigration court to hear their cases.

Judge Richard Seeborg in San Francisco this week granted a request on behalf of 11 asylum seekers from Central America and legal advocacy groups to halt the practice while their lawsuit moves forward.

He held off on enforcing his decision until Friday to give the Government a chance to ask an appeals court for a review.

After the judge's ruling, Mr Trump said on Twitter the decision was "unfair to the US" and "out of control".

Loading

The Trump administration's policy does not do enough to ensure migrants do not face "undue risk to their lives or freedom" in Mexico, Judge Seeborg said.

He also said a law the administration cited as its authority to send migrants back did not apply to asylum seekers like those who sued.

It was not immediately clear whether the administration would ask an appeals court to put the ruling on hold.

Growing numbers of families are fleeing poverty and gang violence in Guatemala, Honduras and El Salvador. ( AP: David J Phillip, file photo )

The White House said Mr Trump "will do whatever it takes" to protect Americans following Judge Seeborg's ruling on Monday.

Press secretary Sarah Sanders tweeted that a "liberal activist judge in San Francisco ruled the United States and Mexico can't work together to address asylum issues at the border".

Loading

Asylum seeker processing changes unprecedented, experts say

The launch of the policy in January at the nation's busiest border crossing — in San Diego — marked an unprecedented change to the US asylum system, government officials and asylum experts said.

Families seeking asylum are usually released in the US with notices to appear in court.

The Trump administration said the policy responds to a crisis at the southern border that has overwhelmed the ability of immigration officials to detain migrants.

Growing numbers of families are fleeing poverty and gang violence in Guatemala, Honduras and El Salvador.

The ruling came a day after Homeland Security Secretary Kirstjen Nielsen resigned and as the administration faces repeated court setbacks on strict anti-immigration measures that were a signature campaign promise for Mr Trump, including losses on such policies as separating families at the border and ending protections for young immigrants.

The lawsuit says the Trump administration is violating US law by failing to adequately evaluate the dangers that migrants face in Mexico.

Under the new policy, asylum seekers are not guaranteed interpreters or lawyers.

The also do not get to argue to a judge that they face potential persecution or torture if they are sent back to Mexico, American Civil Liberties Union (ACLU) lawyer Judy Rabinovitz said at a March court hearing.

Families seeking asylum are usually released in the US with notices to appear in court. ( Supplied: Juan Carlos )

Judge Seeborg said in his ruling "further procedural protections would be required to conform to the Government's acknowledged obligation to ensure aliens are not returned to unduly dangerous circumstances".

The ACLU and other groups also argue in the lawsuit that a law allowing the return of some immigrants to Mexico does not apply to asylum seekers who cross the border illegally or arrive at a border crossing without proper documents.

Judge Seeborg agreed, saying the "plain language" of the law supported that interpretation.

"Try as it may, the Trump administration cannot simply ignore our laws in order to accomplish its goal of preventing people from seeking asylum in the United States," Ms Rabinovitz said in a statement after the ruling.

Thousands of immigration cases backing up

The Trump administration hopes making asylum seekers wait in Mexico will discourage weak claims and reduce an immigration court backlog of more than 800,000 cases.

Justice Department attorney Scott Stewart said at the March hearing there was a process to protect immigrants who could face harm in Mexico.

All 11 plaintiffs in the lawsuit are represented by lawyers, and 10 have already appeared for court proceedings, he said.

Border patrol arrests, the most widely-used gauge of illegal crossings, have risen sharply over the past year but are relatively low in historical terms after hitting a 46-year low in 2017.

The launch of the policy, from which Mexicans and children travelling alone are exempt, followed months of delicate talks between the US and Mexico.

The high razor-wire fence at the US-Mexican border. ( ABC News: Stephanie March )

AP