London (CNN) The mayor of London, Sadiq Khan, compared Donald Trump to a young child after the US President called him a "stone-cold loser."

Khan told CNN that he was "not offended in the slightest" by the remarks, delivered as Trump began his state visit to the UK on Monday, but added that the US was expected to behave more like a role model.

This is the sort of behavior I would expect from an 11-year-old."

"This is the sort of behavior I would expect from an 11-year-old," Khan said. "But it's for him to decide how he behaves. It's not for me to respond in a like manner. I think it's beneath me to do childish tweets and name-calling."

Trump is in London for a three day state visit , a trip marked by both pageantry and protests.

The president received a royal welcome from Queen Elizabeth on Monday, completed with a guard of honor march, gun salutes and opulent white- tie state banquet at Buckingham Palace

But the visit has also attracted anti-Trump protests. As Khan spoke to CNN at City Hall in London, a large inflatable caricature of the US President as a diaper-wearing baby was inflated outside the UK Parliament.

Khan said people in London had the right to protest, as long as it's done peacefully. "They'll be articulating the concerns we have about the values we both hold dear," Khan said.

Asked whether the UK should be pragmatic in its approach to Trump, given its desire for a post-Brexit trade deal , Khan warned against false hopes. "His mood changes from hour to hour," Khan said. "He can be upset by an article in a Sunday newspaper to the effect that he resorts to name-calling."

Photos: In pictures: President Trump in Europe US President Donald Trump, visiting the Normandy American Cemetery in France, participates in a ceremony to commemorate the 75th anniversary of D-Day on Thursday, June 6. Hide Caption 1 of 45 Photos: In pictures: President Trump in Europe Trump and his wife, Melania, visit the graves of troops who died on D-Day. Hide Caption 2 of 45 Photos: In pictures: President Trump in Europe The Trumps are joined by French President Emmanuel Macron and his wife, Brigitte, as they watch a flyover on June 6. Hide Caption 3 of 45 Photos: In pictures: President Trump in Europe A World War II veteran shows Trump a photo of himself with the President. Hide Caption 4 of 45 Photos: In pictures: President Trump in Europe Trump addresses the commemoration ceremony in France. Hide Caption 5 of 45 Photos: In pictures: President Trump in Europe Macron and Trump embrace during the D-Day ceremony. Hide Caption 6 of 45 Photos: In pictures: President Trump in Europe A World War II veteran looks over Trump's shoulder during the commemoration ceremony. Hide Caption 7 of 45 Photos: In pictures: President Trump in Europe At a D-Day event held Wednesday, June 5, in Portsmouth, England, Trump reads a prayer that President Franklin D. Roosevelt gave over the radio on D-Day. Hide Caption 8 of 45 Photos: In pictures: President Trump in Europe Trump heads back after speaking at the event in Portsmouth on June 5. Hide Caption 9 of 45 Photos: In pictures: President Trump in Europe Britain's Queen Elizabeth II and Prince Charles play host to the Trumps at the D-Day event in Portsmouth. British Prime Minister Theresa May is at left. Hide Caption 10 of 45 Photos: In pictures: President Trump in Europe Trump meets with German Chancellor Angela Merkel on the sidelines of the D-Day event in Portsmouth. Hide Caption 11 of 45 Photos: In pictures: President Trump in Europe The Trumps pose for a photo ahead of a dinner at Winfield House in London on Tuesday, June 4. Joining them, from left, are Woody Johnson, the US ambassador to the United Kingdom; Camilla, the Duchess of Cornwall; Prince Charles; and Johnson's wife, Suzanne Ircha. Hide Caption 12 of 45 Photos: In pictures: President Trump in Europe Trump and Prince Charles share a toast at Winfield House. Hide Caption 13 of 45 Photos: In pictures: President Trump in Europe Trump and British Prime Minister Theresa May speak at the dinner on June 4. Hide Caption 14 of 45 Photos: In pictures: President Trump in Europe Melania Trump spends time with Camilla and Suzanne Ircha, the wife of the US ambassador. Hide Caption 15 of 45 Photos: In pictures: President Trump in Europe Brexit Party leader Nigel Farage, center, arrives at Winfield House, where the Trumps are staying during their visit. Hide Caption 16 of 45 Photos: In pictures: President Trump in Europe Trump and May give a joint news conference on June 4. "I think she's done a very good job," Trump said, reversing past critiques of her failure to strike a Brexit deal that both Parliament and the EU can accept. Hide Caption 17 of 45 Photos: In pictures: President Trump in Europe Trump and May are followed by their spouses as they make their way to the news conference in London on June 4. The President offered plenty of praise for May, who recently announced her resignation. Hide Caption 18 of 45 Photos: In pictures: President Trump in Europe Philip May and Melania Trump attend a garden party at No. 10 Downing Street. Hide Caption 19 of 45 Photos: In pictures: President Trump in Europe Larry, the No. 10 Downing Street cat, sits underneath The Beast, the presidential armored Cadillac. Hide Caption 20 of 45 Photos: In pictures: President Trump in Europe Trump speaks opposite May at a business roundtable discussion in London. Hide Caption 21 of 45 Photos: In pictures: President Trump in Europe Trump stands next to Queen Elizabeth II before a state banquet at Buckingham Palace on Monday, June 3. Joining them are Melania Trump, Prince Charles and Camilla. Hide Caption 22 of 45 Photos: In pictures: President Trump in Europe The state banquet had a few hundred guests, including several of Trump's children. Hide Caption 23 of 45 Photos: In pictures: President Trump in Europe Trump and the Queen laugh during the state banquet. Hide Caption 24 of 45 Photos: In pictures: President Trump in Europe The Trumps tour Westminster Abbey on June 3. Hide Caption 25 of 45 Photos: In pictures: President Trump in Europe The President signed the guestbook at Westminster Abbey. "Thank you so much," his message said. "This has been a great honor. Special place." Hide Caption 26 of 45 Photos: In pictures: President Trump in Europe The Trumps are joined by Prince Andrew as they pay their respects at the Tomb of the Unknown Warrior in Westminster Abbey. Hide Caption 27 of 45 Photos: In pictures: President Trump in Europe The President's convoy drives down Pall Mall in London on June 3. Hide Caption 28 of 45 Photos: In pictures: President Trump in Europe Queen Elizabeth II welcomes the Trumps to Buckingham Palace. She took them on a tour of the royal collection. Hide Caption 29 of 45 Photos: In pictures: President Trump in Europe Among the items on display was "American Pewter Thoroughbred," a gift that Trump gave the Queen last year. Hide Caption 30 of 45 Photos: In pictures: President Trump in Europe Trump inspects a guard of honor at Buckingham Palace. Hide Caption 31 of 45 Photos: In pictures: President Trump in Europe The US National Anthem is played during a welcoming ceremony at Buckingham Palace. From left are Melania Trump, the Queen, Trump, Charles and Camilla. Hide Caption 32 of 45 Photos: In pictures: President Trump in Europe British Army troops fire a cannon in London's Green Park to mark the beginning of Trump's visit. Hide Caption 33 of 45 Photos: In pictures: President Trump in Europe The Queen greets the President as he arrives at Buckingham Palace. Hide Caption 34 of 45 Photos: In pictures: President Trump in Europe Prince Charles greets Trump as he steps off Marine One at Buckingham Palace. Hide Caption 35 of 45 Photos: In pictures: President Trump in Europe The Trumps are welcomed in London by Charles and Camilla. Hide Caption 36 of 45 Photos: In pictures: President Trump in Europe Trump's daughter Ivanka, who is also advisor to the President, looks out of a window at Buckingham Palace. Hide Caption 37 of 45 Photos: In pictures: President Trump in Europe People outside Buckingham Palace photograph the Changing of the Guard ahead of Trump's arrival on June 3. Hide Caption 38 of 45 Photos: In pictures: President Trump in Europe The Trumps arrive at Winfield House, the residence of the US ambassador, on June 3. Hide Caption 39 of 45 Photos: In pictures: President Trump in Europe Amnesty International installs "Resist Trump" banners on Vauxhall Bridge in London. Hide Caption 40 of 45 Photos: In pictures: President Trump in Europe Marine One flies past the BT Tower in London. Hide Caption 41 of 45 Photos: In pictures: President Trump in Europe The Trumps walk toward Marine One after arriving at London's Stansted Airport on June 3. Hide Caption 42 of 45 Photos: In pictures: President Trump in Europe The President salutes troops as he and the first lady arrive at Stansted Airport. Hide Caption 43 of 45 Photos: In pictures: President Trump in Europe Trump is greeted by UK Foreign Secretary Jeremy Hunt after arriving at the airport. Hide Caption 44 of 45 Photos: In pictures: President Trump in Europe The Trumps arrive at Stansted Airport. Hide Caption 45 of 45

In the interview, Khan said Trump had amplified hard-right views and defended white supremacists. "I think it's wrong to amplify the tweets form racists in this country as Donald Trump has done so. I think it wrong, by the way, to separate children from their parents on the border. I think it's wrong to ban people from coming to your country because of the faith they belong to. I think it's wrong to roll back the progress that's been made on the reproductive rights of women or LGBT+ rights."

But the mayor also struck more emollient tone, saying that people in the UK "cherish the special relationship" with the US, "love America and also respect American politicians."

Khan has long been a critic of Trump. In a Sunday newspaper article, he called the US president a "growing global threat" and said it was "un-British" to be rolling out the red carpet for him.

Trump struck back just moments before touching down in the UK on Air Force One. He tweeted that Khan "has done a terrible job as Mayor of London, has been foolishly 'nasty' to the visiting President of the United States, by far the most important ally of the United Kingdom."

"He is a stone cold loser who should focus on crime in London, not me," Trump tweeted.

Trump repeated his criticism of Khan at a joint press conference with Prime Minister Theresa May later on Tuesday.

Asked for his opinion of the British opposition leader Jeremy Corbyn, Trump appeared to misunderstand the question and started talking about Khan, describing him as "negative."

"He's a negative force, not a positive force," Trump said. "I think he should focus on his job," he added.