Yet on Sunday, as Trump criticized the mayor's attempts to evoke order in a city shaken by a terrorist attack that killed seven people and injured dozens more, the fast-talking mayor was uncharacteristically restrained toward the president.
In an interview with the BBC, the mayor had told Londoners not to be "alarmed" by an increased police presence in the city.
"There can be no justification for the acts of these terrorists and I am quite clear that we will never let them win nor will we allow them to cower our city or Londoners," the mayor said in the interview. "Londoners will see an increased police presence today and over the course of the next few days. No reason to be alarmed."
But Sunday morning, Trump posted a tweet presenting the mayor's words in a tone and context that were entirely different: "At least 7 dead and 48 wounded in terror attack and Mayor of London says there is 'no reason to be alarmed!'"
The tweet revived the president's long-running row with the mayor, who has time and time again spoken out about the president's anti-Muslim policies and remarks. But in this instance, the mayor decided to take a quieter route. And that, for some, created for an even sharper response.
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 urging Londoners not to be alarmed when they saw more police - including armed officers - on the streets," a Khan representative said in a statement.
Offensive jabs and inflammatory taunts are anything but new to Khan, a member of the Labour Party who was elected last year as London's first Muslim mayor and the first Muslim mayor of a major Western capital.
Khan was born and raised in cramped government housing in London as the son of a Pakistani bus driver and seamstress, immigrants who moved to London in the 1960s. He trained as a human rights lawyer before becoming a Labour Party member of Parliament for Tooting, a south London constituency. As the Minister of Transport, he became the first Muslim and first Asian to attend Cabinet.
And Khan - the fifth of eight children - slept in a bunk bed at his parents' home until he was 24.
Khan's rise to power came just more than a decade after Pakistanis in Britain faced huge public backlash after coordinated terrorist bombings in London's transit system killed 52 people and wounded more than 700. The official start of campaigning in the race also began the day before Islamic State-linked bombers attacked Brussels and killed 32 people.
And his remarkable win in May of last year - six weeks before Britain voted to exit the European Union - followed a bitterly contested and frequently ugly mayoral race which centered firmly on Khan's religion and family background rather than his politics. Khan's then-rival Zac Goldsmith wrotean article in the Daily Mail that said Khan had "repeatedly legitimized those with extremist views."
Khan, who told The Washington Post he met with "unsavory characters" during his job as a human rights lawyer, was forced to deny claims that he supported Islamic extremists.
Theresa May, then-home secretary, described the former transport minister as "unsafe" to run London at a time when we face "a significant threat of terrorism," because of his history of defending extremists when he was a human rights lawyer.
Boris Johnson, who repeatedly joined Goldsmith on the campaign trail, had said: "In Islam and the Labour party there is a struggle going on, and in both cases Khan - whatever his real views - is pandering to the extremists."
In the buildup to his election, Khan warned against nativist populism, which he described in an interview with The Washington Post's Karla Adam as the "Donald Trump approach to politics." Khan said "it seeks to divide communities rather than unite them."
Shortly after he was elected, ending eight years of conservative leadership, Khan sharply criticized Trump's proposed ban on Muslims from entering the U.S., which the candidate proposed after the terrorist attacks in Paris in November 2015 killed 130 people. Khan called Trump's comments "divisive" and "offensive," saying in an interview with the BBC, "I hope Trump loses - badly."
"I want to educate him," Khan said. "I want him to realize the follies of his ways," adding he hoped to teach Trump how to be a "good citizen, a world citizen."
In a May 2016 interview with Piers Morgan on ITV, Trump responded to Khan's comments with ire, calling the new London mayor "ignorant."
When asked how his proposal to bar Muslims from entering the U.S. would affect people like Khan, Trump told the New York Times that "there will always be exceptions."
In a lengthy interview with Time magazine, Khan said the prospect of a Donald Trump presidency would potentially force him to meet and "engage with" U.S. mayors - such as New York's Bill de Blasio and Chicago's Rahm Emmanuel - before the inauguration, while he knew he still could.
"If Donald Trump becomes the President, I'll be stopped from going there by virtue of my faith, which means I can't engage with American mayors and swap ideas," Khan said. Conservative tacticians thought those sorts of tactics would win London and they were wrong. I'm confident that Donald Trump's approach to politics won't win in America."
"What I think the election showed was that actually there is no clash of civilization between Islam and the West," he added in the Time interview. In reference to Islamic extremists, he said, "What better antidote to the hatred they spew than someone like me being in this position?"
When Trump took steps to follow through on his promised travel ban on people from seven majority-Muslim countries - which was later revised to six - Khan denounced the measure, calling it "shameful and cruel" and saying it would affect many British citizens with dual nationality, including London residents born in countries affected by the ban.
"While every country has the right to set its own immigration policies, this new policy flies in the face of the values of freedom and tolerance that the USA was built upon," Khan said. Last week, Khan also criticized Trump's decision to withdraw the United States from the landmark Paris climate agreement.
The president's tweet on Sunday was also not the first time a member of the Trump family took the mayor's words out of context to criticize him.
In March, hours after an attack at Westminster Bridge in which five people died, Trump's oldest son, Donald Trump Jr, tweeted: "You have to be kidding me?!: Terror attacks are part of living in big city, says London Mayor Sadiq Khan."
Khan's actually spoke those words six months before the Westminster attack, calling terror attacks "part and parcel of living in a big city" while also discussing the need to provide strong security for its residents.
"I want to be reassured that every single agency and individual involved in protecting our city has the resources and expertise they need to respond in the event that London is attacked," Khan had said.
(This story has not been edited by NDTV staff and is auto-generated from a syndicated feed.)