Donald Trump arrives at Buckingham Palace.Toby Melville / Reuters

LONDON—Roads were closed. Flags were raised. Three days of pomp and circumstance were meticulously planned. By the time Air Force One prepared to touch down in London’s Stansted Airport Monday morning, it appeared that everything surrounding President Donald Trump’s state visit to Britain was going to plan.

Then came the tweets.

“Sadiq Khan, who by all accounts has done a terrible job as Mayor of London, has been foolishly ‘nasty’ to the visiting President of the United States,” Trump wrote of the London mayor, with whom he has shared a years-long feud, just minutes before his aircraft was due to land. He went on to compare Khan, whom he called a “stone cold loser,” to New York City Mayor and 2020 Democratic presidential candidate Bill de Blasio—albeit “only half his height.”

The American president’s comments offer a heated start to what was supposed to be (at least aspirationally) an otherwise uncontroversial gathering. For Britain, this state visit is a celebration of, as Prime Minister Theresa May put it, “the strong and enduring ties between our countries.” It’s meant to reinforce the fact that, despite the recent divisions between the two long-standing allies, the “special relationship” that binds them continues to endure.

Such, at least, was the plan for the state visit—the highest honor Britain can extend to a foreign leader. Trump relishes ceremonial events that make him the centerpiece, and he got one on Monday. The three-day event began with a ceremonial welcome at Buckingham Palace, which included an 82-gun salute and a guard-of-honor march. Trump and Melania Trump, the first lady, were greeted at Marine One by Prince Charles and his wife, Camilla. The two couples then walked across the lawn toward the entrance, where they were met by Queen Elizabeth II. They went inside and emerged minutes after the helicopters took flight, and an honor guard lined up on the lawn. Trump and the first lady put their hands over their hearts while a military band played the U.S. national anthem.

Trump and Prince Charles then inspected the honor guard together, with Trump seen making small talk with members of the guard.

The queen, Melania Trump, and Camilla watched from the palace steps, while Ivanka Trump and her husband, Jared Kushner, both senior White House aides, watched from a balcony overhead.

Despite the pomp and pageantry surrounding the state visit, a break in diplomatic niceties was seemingly inevitable. After all, this is a president who hasn’t shied away from goading his British hosts about their health-care system, their response to terrorism, and, more recently, their Brexit strategy. He is also a leader who doesn’t respond well to criticism. Though Trump’s feud with Khan dates back as far as 2016, his latest broadside against the London mayor appeared to be in response to a weekend editorial Khan had written calling Trump a “divisive” figure who does not deserve the “red carpet” Britain is unfurling.

A spokesman for Khan said that “childish insults … should be beneath the president of the United States.” Others, such as the Conservative Party lawmaker Jacob Rees-Mogg, defended Trump’s comments, arguing that, contrary to Khan’s argument against inviting Trump, Britain “should be rolling out the red carpet of the deepest red and finest hue” for him.

Whatever comes of Trump’s feud with Khan, it’s unlikely to be the last political controversy that occurs this visit. After all, the president has already prefaced his trip by repeating criticisms of May’s Brexit strategy and reviving a story in which he appeared to insult Meghan Markle, the American Duchess of Sussex, and he even waded into the ruling Conservative Party’s impending leadership contest, which will determine May’s successor and Britain’s next prime minister.

Any number of provocations could cause the visit to sour. Street protests, which are anticipated to attract thousands of participants, have already been planned. A large yellow blimp depicting the American president as a baby, which was flown in protest of Trump’s first visit to Britain last year, is also expected to make a comeback.

The British “will work pretty hard to ensure it’s smooth. The problem is that by opining on something, [Trump] may totally put his foot in it,” said Thomas Wright, the director of the Center on the United States and Europe at the Brookings Institution.

As far as some are concerned, though, any controversy from Trump is par for the course.

“He is a very controversial president, and we’ve all got used to that over the last two years,” Jeremy Hunt, the British foreign secretary, told Sky News after welcoming the president at Stansted Airport. “There are no visits from President Trump that don’t have unexpected moments.”

We want to hear what you think about this article. Submit a letter to the editor or write to letters@theatlantic.com.