WASHINGTON (REUTERS) - US President Donald Trump on Friday (Nov 9) signed an order that effectively will suspend the granting of asylum to migrants who cross the US border with Mexico illegally, but rights groups rushed to court to try to block the policy.

The order, which goes into effect on Saturday, means that migrants will have to present themselves at US ports of entry to qualify for asylum.

Immigrant advocates have said the Trump administration has deliberately slowed the processing of migrants at official ports, forcing them to wait for days or weeks to request protection.

"I just signed the proclamation on asylum - very important," Trump told reporters on Friday before leaving for Paris. "People can come in but they have to come in through the points of entry."

The order followed other rules unveiled on Thursday that sought to limit asylum claims.

Trump made his hard-line policies toward immigration a key issue ahead of Tuesday's midterm elections, sending thousands of US troops to the southern border and repeatedly drawing attention to a caravan of Central American migrants trekking through Mexico toward the United States.

Trump's proclamation said mass migration on the border with Mexico had precipitated a crisis and he was acting to protect the national interest.

Related Story Trump petitions US Supreme Court in effort to kill 'Dreamers' programme

Related Story Trump backtracks on suggestion US troops could fire on migrants

The order will be in effect for 90 days or until the United States reaches an agreement with Mexico allowing it to turn back asylum-seekers who had traveled through Mexico, whichever comes first.

US and Mexican diplomats have held talks over the issue this year, but there has been little indication Mexico would agree to such a pact.

Three civil rights groups sued on Friday in San Francisco federal court, seeking an injunction against Trump's order.

The lawsuit said the order violated the Immigration and Nationality Act, which allows anyone present in the United States to seek asylum regardless of where they entered the country.

"President Trump's new asylum ban is illegal. Neither the president nor his Cabinet secretaries can override the clear commands of US law, but that's exactly what they're trying to do," Omar Jadwat of the American Civil Liberties Union said in a statement.

The lawsuit was brought by ACLU, the Southern Poverty Law Centre, and Centre for Constitutional Rights.

Stephen Yale-Loehr, a professor at Cornell Law School, said the administration may struggle to justify the national security concerns underpinning the order, as the flow of migrants across the southern border has fallen in recent years.

"We also have an obligation under international law not to return people to a country where they fear persecution," he said.

The United Nations refugee agency UNHCR said on Friday the United States must make sure anyone seeking refugee protection and in need of humanitarian assistance can get both promptly and "without obstruction."

The Trump administration lost a legal battle on Thursday, when a court in California ruled that it must continue a programme begun under former president Barack Obama that protects thousands of illegal immigrants who were brought into the country as children.

Trump said the ruling on the Deferred Action for Childhood Arrivals (Daca) programme was good news because now the administration can appeal the case to the Supreme Court, which has a conservative majority.

"The Daca will now hopefully go to the Supreme Court where it will be given a fair decision," Trump said.