Mr. Trump mischaracterized the London mayor’s remarks. Mr. Khan did not describe terrorism as “part of living in a big city,” as if bombings and shootings were an inescapable fact of life. He said that terrorism preparedness, including providing sufficient support to the police, was “part and parcel of living in a great global city.”

“That means being vigilant, having a police force that is in touch with communities; it means the security services being ready, but it also means exchanging ideas and best practice,” Mr. Khan said in a video interview published by The Evening Standard, another British paper. (For the record, Mr. Khan did say the victims of the Chelsea bombing were in his “thoughts and prayers.”)

“Nothing is more important to me than keeping Londoners safe,” Mr. Khan added. “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.”

On Thursday morning, Mr. Khan said in an interview on CNN that he would not respond to Mr. Trump’s tweet because he had “been doing far more important things over the last 24 hours.”

“What I do know is that the threat level in London and across the country is severe,” he said. “That means an attack is highly likely. I was in New York last year when there was an attack in New York. And terrorists hate the fact that whether it’s New York, whether it’s London, whether it’s Paris, whether its Brussels, whether it’s Istanbul, whether it’s Madrid, we have diverse communities living together peacefully.”

Mr. Trump’s tweet was not well received by Britons, who were still learning details of the attack when he weighed in. On Twitter, Wes Streeting, a member of Parliament from the Labour Party, accused Mr. Trump of capitalizing on the attack in London and called him “a disgrace.”