President Trump listens during a meeting with Bahrain's Crown Prince Salman bin Hamad Al Khalifa in the Oval Office on Nov. 30. (Evan Vucci/AP)

Though it has a long way to go, the science that underlies the fight against extremism has made a lot of progress in recent years. Psychologists and social media analysts have found that people become radicalized by other members of a group. People seek out the like-minded, then enter online forums, then become more extreme by reading and communicating with others. As the study of history will also tell you, individuals will do things as part of a mob that they would not do alone.

This is the psychological mechanism the Islamic State and other Islamist terrorist organizations have used to recruit young men online: They offer them membership and a sense of virtual belonging — then they goad them into action. This is also the mechanism far-right groups have used to organize marches, persuade people to wave racist banners — and worse. Thomas Mair — the man who murdered Jo Cox, a British member of Parliament, in 2016 — spent his time reading neo-Nazi websites. He was a “loner” who, thanks to the Internet, very much felt himself to be part of a mob.

Analysts can also map the relationship between extremists online, and they’ve found that a very small number of social media accounts can be very influential. Sometimes these accounts are unusually engaged or fanatical. But sometimes they are popular because they cross boundaries, posting things from different types of sources, some more mainstream and some more fringe. They have an impact because they normalize the madmen and the conspiracy theorists, give false stories the same status as those that are true, offer tiny grouplets the same exposure as major organizations and, again, enhance their feeling of belonging.

Donald Trump, the president of the United States, runs a Twitter account that functions in exactly this way. Some of the time it is “normal”: There are photos of White House Christmas decorations, pictures of Air Force One. But some of the time, it includes videos, memes, conspiracy theories and other material that can only be described as extremist. This Last week, for example, the president retweeted some videos that were originally posted — out of context and misleadingly labeled — by Jayda Fransen, the deputy leader of a tiny fringe group called Britain First.

Britain First physically harasses British Muslims; last year its members were banned from entering mosques. They march through suburbs holding crosses. Thanks to the ease of Internet conversation, Britain First is also part of an international extremist network. Among other things, Fransen appeared recently at a rally organized by Jacek Miedlar, a former priest whose vicious language won the public condemnation of the Polish Catholic Church.

In this clip from The Washington Post's weekly Opinions roundup, “It’s Only Thursday,” opinion writers Jonathan Capehart, Ruth Marcus, and Jo-Ann Armao discuss the national security risks of President Trump's tweets. (The Washington Post)

Does Britain First matter? In real life, not at all. But its Facebook page has nearly 2 million “likes.” Quite a few of those may be fake, but that doesn’t matter. The page does what it is supposed to do: Gives fans the impression that violent hatred is normal — possibly to deadly effect. When Mair murdered Cox, he was shouting, among other things, the slogan “Britain first.” Now that the American president has retweeted Fransen, that normalization may happen faster. Fransen has been widely interviewed and quoted; she has already posted her thanks, her compliments and appeal for more support from @realDonaldTrump.

If the president’s account was not the president’s account, then counter-extremist teams in the British government or at the tech companies would now track it, and might eventually suspend it. After all, it has successfully given extremists some mainstream endorsement. But it is the president’s account. And so British leaders have publicly appealed to the vast majority of the country who oppose extremism, dislike violence and now see Trump as a possible source of both.

“The British people overwhelmingly reject the prejudiced rhetoric of the far-right, which is the antithesis of the values that this country represents,” said the prime minister, Theresa May. When the president responded by attacking May, dozens of others — members of Parliament, the mayor of London, the archbishop of Canterbury — denounced him. One MP said Trump was “racist, incompetent or unthinking — or all three.” Jo Cox’s widower warned the British to be wary: “Trump has legitimised the far right in his own country, now he’s trying to do it in ours.”

Experts in online extremism know that this tactic can work: They would call it the forging of a strong “counter-narrative.” Others might call it an appeal to patriotism, to solidarity, to another set of values greater and deeper than those propounded by the American president.

To the rest of us, it’s a diplomatic disaster. It will not only undermine Fransen, it will also undermine Trump, along with the reputation of the United States and the strength of one of America’s oldest diplomatic alliances. When the president behaves like a Twitter troll, we all pay the price.

Read more from Anne Applebaum’s archive, follow her on Twitter or subscribe to her updates on Facebook.