The mayor of London says he will not rise to Donald Trump's "beastly" accusation that he did "a terrible job" after 2017's terror attacks.
The US president used an interview ahead of his UK visit to attack Sadiq Khan over the wave of terror attacks in the capital.
He also blamed the mayor for a rise in immigration, saying "look at all the crime brought in".
Mr Khan questioned why he was singled out as being responsible for terrorism.
The mayor was speaking as Labour MP David Lammy accused Mr Trump of being a "racist" who "hates that London chose a Muslim mayor".
I will call it like it is. The real reason Trump blames my friend @SadiqKhan for the terror attacks last year is simple. He hates that London chose a Muslim mayor. The President is racist. He does not deserve to meet our Queen today #StopTrump— David Lammy (@DavidLammy) July 13, 2018
"It's for President Trump to explain why he has singled me out for being responsible for these acts of terrorism, and no other mayor or no other leader," Mr Khan said.
"I'm also quite clear that although there has been an increase in violent crime across England and Wales, including London, over the last four years, I don't think the rise in crime is because of immigration.
"It's for Trump to explain why he thinks there is a link between immigration into Europe and the rise in crime."
In an interview with The Sun, the US president hit out at immigration into Europe, describing the movement of "millions of people" as "very sad".
"Take a look at the terrorism that is taking place. Look at what is going on in London. I think he [Mr Khan] has done a very bad job on terrorism", Mr Trump said.
"I think he has done a bad job on crime, if you look, all of the horrible things going on there, with all of the crime that is being brought in."
The verbal attack came after Mr Khan permitted a plan to fly a giant inflatable "Trump baby" near Parliament to coincide with Mr Trump's UK visit.
The 20ft (6m) high blimp depicts the US leader as an angry infant wearing a nappy and clutching a mobile phone.
Its appearance in central London was approved by the Greater London Authority, and Mr Khan has defended the decision, saying it was not for him to be a censor or to decide what is in good or bad taste.
The pair have been feuding since Mr Khan criticised the US president as "ill-informed" following the London Bridge terror attack in June 2017.
After the attack, Mr Khan said people should not be alarmed by visibly increased security on the streets of the capital.
Mr Trump sparked a backlash when he tweeted: "At least 7 dead and 48 wounded in terror attack and Mayor of London says there is "no reason to be alarmed!"