LONDON — President Donald Trump has canceled a trip to London to open the new $1 billion U.S. Embassy, avoiding protests promised by political opponents.

Some British lawmakers had said Trump was not welcome in Britain after he re-tweeted videos from a far-right British group and criticized London Mayor Sadiq Khan following a terror attack last year.

But Trump said his decision, announced in a late-night tweet, was due to concerns about the embassy’s move from the elite Mayfair district to a far less fashionable area of London.

“Reason I canceled my trip to London is that I am not a big fan of the Obama Administration having sold perhaps the best located and finest embassy in London for ‘peanuts,’ only to build a new one in an off location for 1.2 billion dollars. Bad deal. Wanted me to cut ribbon-NO!” Trump tweeted.

While the former embassy sat in a tony area of designer boutiques and expensive restaurants, the new building is in a former industrial area south of the River Thames that is being redeveloped into a new commercial and residential district.

The relocation was announced in 2008 under the Bush administration. At the time, U.S. Ambassador Robert Tuttle said the decision to move to the five-acre site came after a “long and careful process.”

A Trump visit has been on the cards since Prime Minister Theresa May visited the United States a few days after Trump’s inauguration last year. May proclaimed the strength of the “most special relationship” between the two countries and the government extended an invitation for a state visit as a guest of Queen Elizabeth II.

But a full-blown state visit replete with golden carriages and pomp has been deferred amid the threat of huge protests. The idea gradually evolved into a less-grand working visit in which the president would open the embassy. In December, Ambassador Woody Johnson said he was looking forward to welcoming the president.

In the meantime, the relationship between May and Trump came under strain. The uproar came after Trump retweeted three anti-Muslim videos posted by a leader of the far-right group Britain First — a tiny group that regularly posts inflammatory videos without context.

READ MORE: Trump retweets anti-Muslim videos from British far-right leader

May’s spokesman said the president was wrong to retweet the group’s content — prompting Trump to tell May in tweet that she should focus on “the destructive Radical Islamic Terrorism that is taking place within the United Kingdom” instead of him.

The exchange prompted further calls to dump the visit.

The mayor of London — who has been attacked in tweets by Trump — said Trump appeared to have “got the message from the many Londoners who love and admire America and Americans but find his policies and actions the polar opposite of our city’s values of inclusion, diversity and tolerance.”

“His visit next month would without doubt have been met by mass peaceful protests,” Khan said.

The British government said the opening of the embassy was a matter for the United States. But Foreign Secretary Boris Johnson blamed Khan and Labour Party leader Jeremy Corbyn for discouraging the U.S. leader from coming.

“The US is the biggest single investor in the UK – yet Khan & Corbyn seem determined to put this crucial relationship at risk,” Johnson said in a tweet. “We will not allow US-UK relations to be endangered by some puffed up pompous popinjay in City Hall.”