President Trump announced a harsher approach on the same day that Mr. McAleenan left Guatemala City. Unless Mexico did more to stop the flow of migrants headed north from Guatemala’s border, Mr. Trump said, the United States would impose a 5 percent tariff on all Mexican imports.

More Guatemalans than migrants from any other country — and many of them traveling in families — are seeking to enter the United States along its southwestern border. In April, a majority of 109,144 migrants who were stopped at the border — the highest monthly total since 2007 — were from Guatemala. The increasing flow of migrants has overwhelmed American immigration facilities, where more than 80,000 people are being held.

Situated directly south of Mexico, Guatemala is also a crucial transit point for migrants headed to the United States from Honduras or El Salvador. Most people leaving the region are hoping to unite with relatives already in the United States, searching for economic opportunity to support their families or fleeing from gangs, corruption or extortion.

Over the last three summers, the Trump administration has struggled to curb the migrant surge.

As recently as March, the homeland security secretary at the time, Kirstjen Nielsen, met with leaders of the three Central American countries in a similar appeal to halt what she described as a humanitarian crisis. The next day, Mr. Trump undercut her efforts by saying Guatemala, Honduras and El Salvador “do nothing” to stop the migrants from heading north. He also cut millions of dollars in annual aid to the countries.