Media playback is unsupported on your device Media caption Trump and the facts about the migrant caravan

Migrants who cross the southern US border illegally will temporarily be denied asylum under a new rule, US President Donald Trump has said.

Mr Trump has signed a proclamation barring migrants who enter illegally from asylum for up to 90 days.

The president can stop migration in the "national interest", a statement said. Rights groups say it is illegal and have launched a legal challenge.

Immigration was a major focus in Mr Trump's mid-term election campaign.

The proclamation, which goes into effect on Saturday, triggers regulations adopted by immigration officials on Thursday.

"I just signed the proclamation on asylum - very important," the president told reporters on Friday before leaving for Paris.

"People can come in but they have to come in through the points of entry."

Before the mid-terms, President Trump frequently denounced a caravan of thousands of Central Americans making their way north through Mexico.

He ordered troops to the border and declared the migrants to be an "invasion". Without offering evidence, Mr Trump repeatedly suggested the caravan was politically motivated.

What is the new rule?

Acting Attorney General Matthew Whitaker and Homeland Security Secretary Kirstjen Nielsen first announced the changes on Thursday.

The joint statement said presidents have the power to "suspend the entry of all aliens" and to impose "any restrictions he may deem to be appropriate on them" if they are judged to be "detrimental" to US interests under the Immigration and Nationality Act.

Image copyright AFP/Getty Image caption The US recently inaugurated the first section of President Trump's southern border wall

"Today, we are using the authority granted to us by Congress to bar aliens who violate a Presidential suspension of entry or other restriction from asylum eligibility," the statement said.

The rule will not apply retroactively.

The ban is expected to last 90 days or until the US reaches an agreement with Mexico to turn back asylum-seekers, according to the proclamation.

It will not apply to unaccompanied minors, a justice department official told US media on Friday.

Under US law, there is a legal obligation to hear asylum claims from migrants if they say they fear violence in their home countries.

Under international law, those who do have a serious fear of persecution are considered refugees.

Until now asylum seekers have been entitled to a hearing in the US regardless of how they arrived in the country.

Mr Trump invoked the same executive power he used to justify his travel ban on people from several Muslim-majority nations last year. The plan is expected to be quickly challenged in court.

What have critics said?

The American Civil Liberties Union (ACLU), a group that defends individual rights, declared the move "illegal". Along with the Southern Poverty Law Center and the Center for Constitutional Rights, it filed a lawsuit to block the order in a federal courthouse in San Francisco on Friday.

"US law specifically allows individuals to apply for asylum whether or not they are at a port of entry," the ACLU said in a statement.

It has asked the judge to put Mr Trump's order on hold while the litigation is pending.

Human rights group Amnesty International also came out against the rule.

Secretary General Kumi Naidoo issued a statement attacking the president's "dehumanising rhetoric".

"Asylum is not a loophole, it is a lifeline," Mr Naidoo said. "This policy needlessly places the lives of thousands of people in danger."

Image copyright AFP/Getty Image caption The migrant caravan stopped to regroup in Mexico City en route to the US border

Earlier efforts by the Trump administration to limit migration prompted a political and legal backlash.

In June, the president signed an executive order promising to "keep families together" in migrant detentions, after undocumented parents and children were separated at the border.

Days later, the Supreme Court upheld the president's controversial travel ban against people from several Muslim majority countries.

A number of lower courts had originally deemed the measure unconstitutional.

According to a report by the rights group Washington Office on Latin America, requests for asylum from migrants from Guatemala, El Salvador, and Honduras increased by 25 percent in the fiscal year 2017.

The United States has had a cap on refugee admissions since the Refugee Act - which set out an admissions system for asylum seekers - was passed by Congress in 1980.

Since 2000, the cap has generally been set in the 70,000 to 80,000 range. The Trump administration lowered it to 50,000 in 2017.