Ed Miliband, the former Labour leader, responded to Mr. Trump’s announcement on Twitter, saying “Nope. It’s because nobody wanted you to come. And you got the message.”
The old embassy, in a historic square in the exclusive Mayfair neighborhood, was deemed to be vulnerable to terrorist attacks. The new one is in a former rail yard on the South Bank of the Thames. Mr. Trump blamed the Obama administration for the move, accusing it of selling the old embassy for “peanuts” in a “bad deal.”
But the move was actually initiated during the administration of President George W. Bush. “This has been a long and careful process,” Robert Tuttle, then the ambassador to Britain, said in October 2008.
The Trump presidency has complicated the normally close ties between the United States and Britain, which has often been called the “special relationship” since Winston Churchill used the phrase in a 1946 speech.
Mr. Trump has used terrorist attacks in London to support his travel ban on visitors from predominantly Muslim countries. He criticized London’s mayor, Sadiq Khan, for his response to a bombing in June, misconstruing a call for calm as lack of concern about terrorist threats. And his tweets about a bombing in London in September suggested that the police had been monitoring attackers but done nothing.
His retweets of a far-right group’s anti-Muslim videos from in November triggered criticism from across the political spectrum in Britain.
Ms. May had been placed in an awkward situation, as Mr. Trump’s unpopularity in Britain prompted calls that she stand up to the president or even call off his visit. At the same time, her government is in the midst of complicated negotiations to withdraw from the European Union and under pressure to prevent relations with the White House from deteriorating further.
Boris Johnson, the British foreign minister, said last week that it would be a mistake to uninvite Mr. Trump, as one member of parliament suggested.
“I think Her Majesty the Queen is well capable of taking this American president – or indeed any American president – in her stride, as she has done over six remarkable decades,” Mr. Johnson said.