When Mexican President Enrique Peña Nieto extended an invitation to the U.S. presidential candidates last week, he reportedly never expected Donald Trump to turn up on his doorstep.

Several top-level Mexican officials and diplomats told the Washington Post on Tuesday that they were never informed that Trump had even been invited, or that he had announced on Twitter that he had scheduled a last-minute visit.

“It took by surprise many of the high-level officials in the government. Many people didn’t know,” a senior official told the Post. “Someone thought it was a very good idea just to send this letter, and they didn’t expect one of the candidates would say yes.”

Peña Nieto sent a letter to both Hillary Clinton and Trump on Friday offering to host them for a discussion on the bilateral relationship between their respective countries. The Republican nominee agreed to visit a country he has denigrated on the campaign trail for taking jobs from Americans and sending “criminal” immigrants over the United States’ southern border.

The Post reported that the announcement, which has infuriated many Mexican politicians, artists and academics, came as Foreign Minister Claudia Ruiz Massieu was attending the opening of a new Mexican consulate in Milwaukee. Massieu’s staffers told the newspaper that they received no advance warning of Trump’s visit.

The trip came as a surprise to the press following Trump on the campaign trail, who were sent on to Phoenix, where he is slated to deliver a speech outlining his immigration policy on Wednesday night. The short notice also caused alarm among staff at the U.S. Embassy in Mexico, who told CNN that it would be a logistical headache to ensure security for such a last-minute visit.

The Trump campaign has batted down suggestions that the trip was organized on a whim, insisting that authorities in both Mexico and the U.S. have spent the last five days working out an agenda.

“There have been intense, around-the-clock discussions between both parties since last Friday to establish an agenda for discussion and make sure it is a fruitful use of both leaders’ time,” an anonymous Trump official told Bloomberg Politics.

The source told Bloomberg that the conversation will touch on the drug war, jobs, and trade, and that both camps will issue statements after the meeting.

Trump’s son-in-law Jared Kushner was key to the agenda negotiations, the official said.