The court's ruling indicated any such agreement should first be approved by the Central American nation's Congress
Guatemala's constitutional court late Sunday granted an injunction blocking President Jimmy Morales from signing a migration deal with the United States which would oblige it to offer asylum to migrants heading to the US border.
Morales, who was under pressure at home not to seal the deal, earlier Sunday called off White House talks with Donald Trump with just a day to spare, his office announced.
The meeting scheduled for Monday in Washington was pushed back due to "speculation" about the signing of a possible deal and to await the decision of the court on legal actions filed over it, the Guatemalan government said in a statement.
On Sunday night the constitutional court granted a provisional injunction to prevent Guatemala constituting itself as a "safe third country."
The court's ruling indicated any such agreement should first be approved by the Central American nation's Congress.
As a "safe third country", Guatemala would be obliged to offer asylum to any migrants entering its territory on the way to the United States.
Many migrants from Honduras and El Salvador cross Guatemala, one of the poorest countries in Latin America, to reach Mexico on their route to the US border.
The Guatemalan government had announced Morales' visit last week, saying it would touch on immigration and security issues, but never offered details about what he and Trump would discuss.
Guatemalan officials did acknowledge that talks on a "safe third country" agreement were underway, leading to swirling speculation.
Those opposed to such a deal say they do not want Guatemala to become a dumping ground for migrants heading to the US, especially given that Guatemalans are often among those making the journey.
The deal has already been rejected by the two candidates vying for Guatemala's presidency next month.
Centre-left former first lady Sandra Torres will face off against conservative candidate Alejandro Giammattei on August 11 for the right to succeed Morales in January.
In March, Trump's administration suspended aid to the "Northern Triangle" countries of Guatemala, El Salvador and Honduras after the Republican leader said they were doing nothing to stem the flow of migrants to the US.