(Adds background)

WASHINGTON, July 26 (Reuters) - The United States and Guatemala signed a so-called safe third country immigration asylum agreement on Friday just days after U.S. President Donald Trump threatened to impose tariffs on the Central American country if it did not agree to the deal.

Speaking to reporters at the White House during a signing ceremony, Trump said the agreement would allow easier access to farmer workers for U.S. farms and ranches.

Guatemala's President Jimmy Morales was due to sign a deal with Trump last week that would have made the country act as an asylum buffer zone to reduce immigration to the United States.

But the country's Constitutional Court ruled he could not sign such an agreement without prior approval from Congress, which is on a summer recess.

In response, Trump threatened Guatemala in a tweet on Tuesday. "Now we are looking at the 'BAN,' Tariffs, Remittance Fees, or all of the above. Guatemala has not been good," Trump wrote. (Reporting by Steve Holland; Writing by Mohammad Zargham and Tim Ahmann Editing by Susan Thomas)

Our Standards: The Thomson Reuters Trust Principles.