LONDON — After the terrorist attack here on Saturday, Londoners united in grief and resolve to go on with their lives. The city’s popular mayor, Sadiq Khan of the left-wing Labour Party, emphasized the need for resilience in the face of attempts to terrify.

“We will never let them win, nor cower in fear,” Khan said in a TV appearance the morning after the attack. "Londoners will see an increased police presence today and over the course of the next few days. There's no reason to be alarmed.”

This made President Donald Trump very, very angry. So angry, in fact, that he took to Twitter shortly after Khan’s Sunday comments to berate him:

At least 7 dead and 48 wounded in terror attack and Mayor of London says there is "no reason to be alarmed!" — Donald J. Trump (@realDonaldTrump) June 4, 2017

Trump was, of course, taking Khan out of context: Khan was saying there’s no reason to be alarmed by the increased police presence in their area, not by terrorism in general.

Yet the mayor, who is Muslim, did not initially respond directly — allowing a spokesperson to bash Trump in a statement to the press. “[The mayor] has more important things to do than respond to Donald Trump's ill-informed tweet that deliberately takes out of context his remarks,” the spokesperson said.

This seemed to only incense Trump further. On Monday, the president took to Twitter again to attack the mayor:

Pathetic excuse by London Mayor Sadiq Khan who had to think fast on his "no reason to be alarmed" statement. MSM is working hard to sell it! — Donald J. Trump (@realDonaldTrump) June 5, 2017

This prompted Khan himself to weigh in on British television. In television appearances since Trump’s tweet, Khan has vocally and directly attacked the American president — even calling on Conservative Prime Minister Theresa May to cancel a planned state visit by Trump later this year.

“Some people thrive on feud and division. We are not going to let Donald Trump divide our communities,” Khan said in a Monday BBC appearance.

The increasingly public and bitter Khan-Trump feud highlights Trump’s remarkable unpopularity among the leaders of America’s closest allies, many of whom find that their political fortunes improve if they confront the US president and suffer if they’re perceived as being too close to him.

Take new French President Emmanuel Macron, who made waves last week after openly condemning Trump’s decision to pull out of the Paris climate accord, giving Trump an aggressive and muscular handshake, and lumping Trump in with other autocratic strongmen like Turkish President Recep Tayyip Erdoǧan and Russian President Vladimir Putin. “I don’t believe in diplomacy by public abuse, but in my bilateral dialogues I won’t let anything pass,” Macron said after attacking Trump.

On the flip side, May has faced persistent criticism at home for seeming too deferential to Trump during a White House visit in January. "I don't care how special the relationship is, some lines just shouldn't be crossed," Heidi Allen, a lawmaker from May’s own party, tweeted after May returned to the country. "Strong leadership means not being afraid to tell someone powerful when they're wrong.”

Though a Khan spokesperson sent me a statement indicating that they were moving on — “the mayor is focused on dealing with Saturday's horrific and cowardly attack” — Khan’s call to cancel Trump’s state visit over the row is being echoed by many prominent British politicians, hoping to take advantage of anti-Trump sentiment to win votes in Thursday’s national election. The issue clearly has some legs.

And as much as Khan’s team won’t admit it, it’s very much in the mayor’s political interest to keep this feud alive. In fact, Khan actually started it — way back in 2015, when he went out of his way to go after Trump’s then-new Muslim ban proposal in British-harsh terms. It got so heated in mid-2016 that Trump challenged Khan to an IQ test.

For a politician like Khan, who has built his political identity around a deep opposition to discrimination and the need for resilience in the face of terrorism, this long-running feud only makes him look better.

“What percentage of Britons like Trump? I think 10 percent,” says Ben Walker, founder of the poll-watching site Britain Elects.

More broadly, the Khan-Trump feud shows the remarkable backlash that’s brewing across the Western world to the American president. Politicians like Khan, who champion equality and internationalism, have everything to gain by attacking Trump given his historic unpopularity there. You’ve seen it recently with Macron and German Chancellor Angela Merkel; now you’re seeing it with the mayor of London and other British politicians.

“Driving Muslims away isn’t going to make the [jihadist] problem go away; it’s going to exacerbate the problem,” Mike Katz, a Labour candidate for Parliament in northern London, said when I asked him about Trump at a campaign event on Sunday. “What greater cheerleader do we have for saying Muslims have no place in liberal democracy than the president of the United States?”

The Khan-Trump feud, then, may not be a one-off — but rather a window into how Trump’s belligerency is infuriating allied leaders and seriously wounding America’s reputation abroad.

Who is Sadiq Khan?

To understand the full significance of the past few days’ events, you need to understand a bit about Khan himself.

Unlike many British politicians, Khan emphatically does not come from a wealthy family. His Pakistani immigrant parents raised him in public housing; his mother was a seamstress, and his father drove a bus. His humble immigrant upbringing is such a common theme of Khan’s that the phrase “son of a bus driver” has become a tiresome cliché for British journalists who cover him.

His adult life has been defined by a focus on minority rights and, in particular, Muslim inclusion. Before going into politics, Khan worked as an attorney regularly representing clients alleging racial discrimination. He was elected to Parliament, for an area of London called Tooting, in 2005. Shortly thereafter, the largest jihadist attack in British history hit — the 7/7 bombings of the London Underground, which killed 52 people and wounded 700.

This, according to the BBC’s Esther Webber, was the moment that Khan became a national figure. His speech in Parliament right after the attack showed him to be an articulate voice for the vast majority of British Muslims who rejected the jihadists’ actions.

"Today Londoners, and the rest of the UK, have even more reason to be proud of Londoners — proud of the way heroic Londoners of all faiths, races, and backgrounds, victims, survivors, and passers-by, acted on Thursday,” Khan said.

Khan proceeded to emerge as a leading advocate for preserving civil liberties in the wake of a terrorist attack, voting to block Labour Prime Minister Tony Blair’s proposal to allow the authorities to detain terrorism suspects for three months without charge.

Ten years later, Khan had emerged as a major power broker inside the Labour Party and perhaps the most prominent Muslim politician in all of Britain. In May 2015, he officially announced his bid for mayor of London, a position with far more authority and influence.

Slightly more people live in London’s city limits than New York’s, yet Britain as a whole has roughly one-fifth the US’s population. Twenty-one percent of Britons live in the London metropolitan area.

Beyond population, London is the UK’s political, cultural, and financial capital. London alone generates 22 percent of the UK’s GDP; the entire state of California, housing both Hollywood and Silicon Valley, generates about 13.3 percent of America’s.

Which means that being mayor of London is more like being the governor of a major state, in terms of national profile and scope of responsibilities, than being mayor of any American city. Even that might understate the case.

So when Khan was running for mayor, he was running for one of the most important and high-profile political positions in all of Britain. Where he stood on national and even international issues had all of a sudden became a major news item in the UK.

Then, roughly seven months after Khan announced his candidacy, two jihadists walked into an office in San Bernardino, California, and opened fire.

The origins of the Trump-Khan feud

In the wake of the San Bernardino attack, which killed 14 and wounded 22, Republican primary candidate Donald Trump called for a “total and complete shutdown of Muslims entering the United States.” It was the harshest of harsh overreactions to a terrorist attack, a singling-out of all Muslims as potential terrorists.

It was, in short, what Khan had spent his adult entire life fighting.

So when the BBC asked Khan about Trump’s comments just one day after they were made, the mayoral candidate pulled no punches. Attacking things like the Muslim ban was at the core of his political identity; there was no way he was going to let this go.

“I’m in favor of debating him: showing how wrong he is, proving what a buffoon he is,” Khan said. “His views are divisive, they are outrageous, and I hope he loses. Badly.”

Of course, Trump didn’t lose — and neither did Khan. He won the London mayoral race in May 2016, after a nasty campaign in which the Conservative candidate accused him of palling around with Islamist extremists.

After Khan’s victory, the New York Times asked Trump if Khan would be allowed into the United States under the proposed “Muslim ban.”

“There will always be exceptions,” Trump said. Then, seemingly unaware of Khan’s previous attacks, he added some kind words: “I hope he does a very good job because frankly that would be very, very good.”

Khan wasn’t interested in reciprocating. He rejected Trump’s offer to be an exception, calling the then-candidate’s view of Islam “ignorant.”

"This isn’t just about me," Khan responded to Trump. "It’s about my friends, my family, and everyone who comes from a background similar to mine, anywhere in the world."

When Trump was informed of this, during an interview with Piers Morgan the next day, he grew visibly angry.

“Let’s do an IQ test. Ignorant? Huh,” Trump said in response. “When he won, I wished him well; now, I don’t care about him. ... Tell him they’re very rude statements, and frankly, I will remember those statements.”

Khan kept up the feud afterward. In September 2016, during his first official visit to the United States, he gave a speech at the Chicago Council on Global Affairs bashing Trump’s ideas and outright endorsing Hillary Clinton.

“I think to suggest somehow that Muslims aren’t welcome in the USA, to suggest somehow that being a Muslim isn’t compatible with being Western, unintentionally plays into the hands of Daesh or so-called ISIS,” Khan said. “I think the message it sends when the most powerful politician in the world is a woman is phenomenal, and I hope she wins.”

The point, then, is the Trump-Khan sparring we’ve seen since the London attack was almost certainly inevitable. Khan sees Trump as personally bigoted against people like him; Trump feels personally insulted by Khan’s criticisms and has vowed to remember them.

The president is, as Rosie O’Donnell knows, quite good at holding on to grudges. All that was needed to reignite their war of words was a trigger: some event that concerned both men, that would cause one of them to do something that would set off the other.

A terrorist attack was always the most likely event to do that. Trump’s reaction to a major terrorist attack is always to call for more aggressive measures, particularly crackdowns on Muslim civil rights. After the London attack, in fact, he demanded that the courts reinstate the travel ban, and even lamented that his earlier, more stringent version had been watered down.

Khan, by contrast, makes a point of emphasizing the need for resilience in the wake of an attack: of the need to maintain a commitment to liberal values and tolerance in the face of terrorist provocations.

This isn’t just a personal feud, born solely of two male politicians’ bruised egos. This is a clash of worldviews, an example of how Trump’s extreme views on Islam and terrorism put him at odds with leading politicians of some of America’s closest allies.

Khan’s response points to a growing Trump backlash

I have a message for you guys. ‎Posted by Emmanuel Macron on‎ חמישי 9 פברואר 2017

I spoke to three experts on British politics in the process of writing this piece, and asked each of them a simple question: How might this feud affect Khan’s political standing in the UK?

The answer was unanimous: It almost certainly wouldn’t hurt, and would more likely boost, Khan’s support.

“He's managed it very well — putting Trump down without descending to his level,” judges Matt Williams, a political scientist at the University of Oxford.

Perhaps the starkest point in favor of this theory is that on Tuesday morning, in the heat of an election, Conservative Prime Minister Theresa May was forced to come to Khan’s defense — saying that “Donald Trump is wrong in what he said about Sadiq Khan.”

It’s somewhat remarkable to see a Conservative defending a leading Labour politician just two days out from a national election. It’s especially remarkable since Khan has been blasting May’s handling of terrorism: On Tuesday morning, he warned that her government’s cuts to police funding “mean we are in more danger.”

The Trump fight, then, is more likely to help elevate Khan than anything else.

“He [has been] billed as a future leader of the Labour Party and prime minister,” says Walker, the Britain Elects expert. “Approval of him is massive, and I think the comments by your president are only going to make him more popular.”

Khan, as much as he may not admit it, clearly recognizes this dynamic — that taking on an unpopular American president is a really smart way to get attention and approval. He’s one of a growing number of international figures who are using Trump as a foil to boost their own political popularity.

During the recent French presidential campaign, for example, then-candidate Emmanuel Macron positioned himself as the anti-Trump. He released not one but two videos starring former President Barack Obama, one of which was a formal Obama endorsement. He also released a web ad bashing Trump’s policies on climate change, even promising to give American climate scientists French visas.

“I do know how your new president now has decided to jeopardize your budget, your initiatives,” Macron says in the ad. “Please come to France — you are welcome here.”

Macron beat his opponent, the far-right National Front’s Marine Le Pen, by a decisive 31-point margin (65.5 to 34.5 percent).

German Chancellor Angela Merkel, at a rally for her reelection campaign in Munich last week, sounded a similar note — telling her Christian Democratic Union faithful that her recent experiences meeting with Trump at European summits proved that Europe can no longer rely on the United States.

“The times in which we could completely depend on others are, to a certain extent, over,” she declared. “I’ve experienced that in the last few days — we Europeans truly have to take our fate into our own hands.”

What’s interesting here is that Merkel, unlike the left-wing Khan and center-left Macron, is center-right by German standards. She has been open to refugees, true, but she ultimately represents the conservative end of mainstream German politics.

And that’s the key point here. Politicians across the political mainstream are increasingly seeing an advantage in attacking Trump on issues ranging from the travel ban to climate change to the trans-Atlantic alliance. They’re right to: Surveys of European public opinion and studies of European newspapers find broad and deep opposition to the new American president among continental voters.

What that suggests, then, is that the Khan feud is not an isolated incident, rooted solely in the two men’s particular views. Rather, it shows that political incentives in Europe are shifting, such that it pays for European politicians to emphasize the parts of their ideologies that contrast with Trump’s most starkly unpopular policies.

Initially, it seemed that the twin shocks of Brexit and Trump’s election would galvanize far-right movements across the world. But in elections since Trump’s November victory — be they in Austria, the Netherlands, or France — the far-right candidate has lost, and a centrist has won.

It seems, instead, that the opposite of what many expected is happening — that Trump’s bluster and blunders are creating a pro-tolerance, internationalist resurgence. We’re still in the early stages of such a reaction, and it could well turn out to be short-lived. But the Khan feud is the most dramatic evidence yet that a Trump backlash is brewing.