LONDON — Donald Trump’s state visit to Britain should be canceled without delay. The withdrawal of the invitation extended to the president in January by Prime Minister Theresa May would indeed be a diplomatic embarrassment and — given Mr. Trump’s vindictive temperament — would be unlikely to go unpunished. Such a decision is never easy to take. But it must be taken.

On Wednesday morning, Mr. Trump retweeted a series of anti-Muslim videos posted by Jayda Fransen, the deputy leader of Britain First, an ultranationalist group so far to the right that it is repudiated by nearly every sector of British politics and society.

It is hard to exaggerate how disgusted Britons are by the president’s recent behavior on Twitter. The prime minister responded on Thursday, saying, “I’m very clear that retweeting from Britain First was the wrong thing to do.” Before her, Sajid Javid, the communities secretary and a Muslim, wrote on Twitter: “So POTUS has endorsed the views of a vile, hate-filled racist organization that hates me and people like me. He is wrong and I refuse to let it go and say nothing.” Jeremy Corbyn, the leader of the Labour Party, called the retweets “abhorrent, dangerous and a threat to our society.”

It is worth bearing in mind that Ms. Fransen — who celebrated the attention delivered by the American president — is facing charges of religiously aggravated harassment. At least one of the original videos, captioned “Muslim migrant beats up Dutch boy on crutches!,” is completely inauthentic. The others are of dubious provenance at best.