Guatemala, as well as its southern neighbours, El Salvador and Honduras, have all been struggling to curb the flow of people leaving for the United States.

The case of a Salvadorean migrant who drowned alongside his daughter trying to cross the Rio Grande on the US-Mexican border prompted El Salvador's president to say his country had to do more to fix the problems forcing people to leave.

What did President Morales say?

In his Tuesday appeal, Mr Morales argued that the injunction by Guatemala's Constitutional Court was unlawful.

He said there were people in the Central American country interested in damaging its stability.

It was not immediately clear when the appeal would be considered.

What about President Trump's warning?

Mr Trump took to Twitter to warn that he was considering a series of retaliatory measures, including tariffs or remittance fees.

The Trump administration has been seeking to curb migration from Central America by introducing new rules over who can claim asylum in the US.

The measures, unveiled last week, say migrants who fail to apply for asylum in a country they pass through en route to the US will be ineligible.

Migrants who have been trafficked will be exempt from the ban.

Media playback is unsupported on your device

Media captionWhat happens if Mexico doesn't stem the migrant flow?

Mr Trump says "loopholes" in the asylum process are allowing migrants from Central America and elsewhere to live in the US illegally.

Currently, when migrants arrive at the US-Mexico border, they are allowed to request asylum regardless of which country they passed through to get there.

Only migrants who have travelled through countries deemed to be "safe" face restrictions on their asylum claims in the US.

Claimants are free to reside in the US until their case is dealt with - a process that often takes years.

Other attempts to deny asylum to migrants who enter the country illegally have been challenged in court.

Under the 1951 UN Refugee Convention, there is no obligation on refugees to claim asylum in the first safe country they reach. Asylum seekers are protected against prosecution for illegal entry to a foreign country by Article 31 of the Convention.

However, the Trump administration has taken the view that most newcomers from Central America are economic migrants and not genuine refugees.