Image caption Sadiq Khan was speaking on the Andrew Marr show

It may surprise his Twitter followers, but London's mayor says he will meet Donald Trump when he visits the UK.

The pair have clashed on the social media platform, most famously in the aftermath of the London Bridge attack.

Speaking on Sunday's Andrew Marr show, Sadiq Khan said he would use a Trump visit to show the US president the places where people of all faiths "respect, celebrate and embrace" each other.

Here's a look back at the pair's complicated relationship.

London Bridge attack

After July's vehicle and knife attacks on London Bridge and Borough Market, Mr Khan tweeted that Londoners should not be alarmed by an increased number of police on the capital's streets.

Mr Trump was quick to react, tweeting:

A war of words - and tweets - followed, with the president calling Mr Khan's clarification of his statement a "pathetic excuse".

The Muslim ban

In December 2015, the then presidential candidate Trump responded to a shooting in San Bernardino, California, by calling for a ban on Muslims entering the US.

When Mr Khan became mayor of London the following year, the president was questioned about whether he would be allowed into the US. He responded that "there will always be exceptions" to the ban.

But the mayor rejected this, saying: "I don't want to be the exception to be allowed to go to America.

"It's not about me. It's about my friends, family and others from all around the world."

Westminster attack

This spat did not involve the president directly, but rather his son, Donald Trump Jr. In the wake of March's terror attack in Westminster, he tweeted an interview by Mr Khan from 2016, in which he said terror attacks were "part and parcel of life in the big city". He implied that Mr Khan was accepting terror.

However, Mr Khan had in fact been referring to a previous attack in New York and was urging residents of big cities to remain vigilant. He refused to address Mr Trump Jr's tweet, saying he had been "doing more important things" in the hours after the attack.

'Reluctant participant'

On the Marr show, Mr Khan acknowledged previous disagreements with the president.

He described himself as a "reluctant participant" in the Twitter "fisticuffs" with Mr Trump.

He said that it was important for the UK to maintain a close relationship with its closest ally and that he supports Theresa May's close working relationship with the president.

However, he added: "What I'm not in favour of is a state visit with all that it entails - with the red carpet being rolled out."

He also said, of London: "I think we can be a beacon not just to the president of the USA but to the rest of the world as to how we should do things."