U.S. President Donald Trump on Tuesday threatened retribution against Guatemala after the country’s high court blocked its government from signing an asylum deal with Washington.

Trump tweeted that Guatemala has decided against signing a “safe third agreement” requiring Central American migrants seeking asylum in the U.S. to instead apply for those protections in Guatemala, even though the country’s government never said it had agreed to the arrangement.

Such an agreement would mean that Salvadorans, Hondurans and people from elsewhere who cross into Guatemala would have to apply for asylum there instead of doing so at the U.S. border — potentially easing the crush of migrants overwhelming the U.S. immigration system and handing Trump a concession he could herald as a win.

Guatemala “has decided to break the deal they had with us,” Trump complained.

“Now we are looking at the ‘BAN,”‘ he wrote, along with tariffs, fees on remittance money Guatemalans working in the U.S. send back to their country, “or all of the above.”

Trump later painted the court ruling as a convenient excuse for the country, saying: “In other words, they didn’t want to sign it.”

Trump has been trying to get countries including Guatemala to do more to stop the flood of Central American migrants who have been overwhelming the U.S. southern border, jeopardizing his campaign promise to end illegal immigration. Negotiations over a potential deal ended when Guatemala’s constitutional Court granted three injunctions preventing President Jimmy Morales from entering a deal.

A July 15 meeting between Trump and Guatemala’s president was also called off because the high court had yet to issue its ruling.

Morales responded to the tweets with a statement posted on Facebook blaming Guatemala’s constitutional court justices for upsetting Trump.

The court, he said, has repeatedly ruled “ruled against the content and spirit” of the Guatemalan constitution. 

He added that “most of its judges… have used their investment to meddle in the foreign policy of the Guatemalan state.”

Guatemalan president Jimmy Morales, shown here at a Feb. 25 meeting in Colombia, said the Guatemalan Supreme Court and those who support its decision are responsible for any retribution from the U.S. (Luisa Gonzalez/Reuters)

Trump nonetheless accused the country’s leaders of having gone “back on their word to us” in remarks at a summit of conservative teenagers in Washington.

“They were all set to sign a safe third agreement and then today or yesterday, they announced they can’t do it because they got a Supreme Court ruling. Their Supreme Court, right?” Trump said in a dismissive tone, repeating his tariff and “ban” threat.

The White House did not respond to questions Tuesday about what he meant in his reference to a “ban,” but the United States is Guatemala’s most important trade partner, with the countries swapping $10.9 billion worth of goods last year. The top U.S. exports to Guatemala include fuel minerals such as coal, petroleum and natural gas; machinery and corn. Top imports from Guatemala include bananas and plantains, clothing and coffee.

Guatemalan migrants use a makeshift raft to illegally cross the Suchiate river from Tecun Uman in Guatemala to Ciudad Hidalgo in Chiapas State, Mexico, on Monday. (Alfredo Estrella/AFP/Getty Images)

Still, Guatemala’s economy is small and its people poor, making for a lopsided relationship. Guatemala ranks just 46th among U.S. partners in the trade of goods, and any sanctions would likely first impact Guatemala’s financial and industrial elite, said political analyst Roberto Santiago.

Trump could also hurt the country by trying to tax remittances, which are equal to 12.1 per cent of the Guatemalan economy, according to the World Bank. The United  States is Guatemala’s main trading partner, with bilateral trade of some $4.7 billion through May this year, Central Bank data shows.

Trump also accused the country by tweet of “forming Caravans and sending large numbers of people, some with criminal records, to the United States,” even though there is no evidence that the Guatemalan government had anything to do with organizing the migrant caravans or “sending” anyone to the U.S.

The caravans, a phenomenon that died out months ago after Mexico cracked down, originated in neighbouring Honduras and were joined by people from Guatemala, El Salvador and elsewhere as they moved through Guatemala and then Mexico.