Donald Trump’s unpopularity in the U.K. is not without consequence.

President Donald Trump has canceled a trip to London to open the new U.S. Embassy, blaming the Obama administration for selling the old building in the city for “peanuts.” His decision was greeted with relief by London’s Mayor Sadiq Khan who said Trump had “finally got the message” that he was not welcome in the capital.

Late last night, Trump wrote on Twitter: “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!”

Before we take a closer look at Trump’s poorly written rationale, it’s important to acknowledge the fact that the actual reason for his cancellation is not a mystery. The American president is deeply unpopular in the U.K., and by all appearances, Trump saw little value in facing widespread protests and condemnations while visiting one of the United States’ closest allies.

But to acknowledge these obvious truths is, for all intents and purposes, an impossibility for Trump, who has convinced himself of his universal popularity. It was therefore necessary for the Republican to craft an alternate, face-saving explanation.

Which is why Trump decided to blame Barack Obama – a self-satisfying rationale that completely unravels under modest scrutiny.

Indeed, practically every aspect of the president’s trumped-up excuse is demonstrably foolish. The Obama administration, for example, wasn’t responsible for changing the location of the embassy; the decision was initiated under George W. Bush’s administration. It was U.S. officials who believed the move was necessary for security reasons.

What’s more, as NBC News’ report explained, while Trump complained last night about the financing of the new building, the embassy has been “entirely funded by the proceeds of the sale of other U.S. government properties in London and ‘not through appropriated funds.’”

This is hardly the stuff of “bad deals.”

But what’s especially amusing about all of this is the post-hoc rationalizing. Trump had not previously made any mention of his of concerns about the location or cost of the new U.S. embassy. And yet, once his unpopularity made him unwelcome in London, the American president scrambled to think of an excuse that wouldn’t leave him looking ridiculous – and what he came up with were claims that weren’t even true.

What a fiasco.

Correction: I’ve edited the above text to make clear that Trump’s state visit to the U.K. may yet happen and the cancellation refers to the opening of the U.S. embassy.