WASHINGTON — President Donald Trump’s tweet Friday suggesting London police missed an opportunity to prevent a homemade-bomb explosion on a London subway drew a warning against “speculation” from British Prime Minister Theresa May.

Trump, who used the terrorist incident to promote a tougher version of his proposed travel ban, tweeted soon after the fire occurred: “Another attack in London by a loser terrorist. These are sick and demented people who were in the sights of Scotland Yard. Must be proactive!”

In a televised interview, May responded by saying, “I never think it’s helpful for anybody to speculate on what is an ongoing investigation.”

Trump was briefed on the improvised explosive, before ISIS later took credit, and spoke on the phone with May and conveyed his concerns for the victims and offered support, the White House said.

Asked if the tweet came up in the conversation, White House press secretary Sarah Huckabee Sanders said, “I believe it did. I understand it may have come up.”

National Security Adviser H.R. McMaster told reporters at the White House briefing that Trump was speaking generally about the responsibility of law enforcement agencies to stay on top of terrorist activity.

advertisement | advertise on newsday

“If there was a terrorist attack here, God forbid, that we would say that they were in the sights of the FBI,” McMaster said. “I think he means generally that this kind of activity is what we are trying to prevent.”

Trump called for a “very, very tough” crackdown on terrorism after the fire in a London subway station injured at least 29 people.

“It keeps going and going, and we have to be very smart and we have to be very, very tough — perhaps we’re not nearly tough enough,” Trump said during a brief appearance in the Rose Garden on Friday.

Those comments followed a string of tweets Friday morning in which the president said terrorists must be dealt with in a “tougher manner,” that the internet as a recruiting tool must be “cut off” and that the fight against ISIS must be “proactive and nasty.”

Trump also brought up his travel ban, which has become enmeshed in legal challenges.

“The travel ban into the United States should be far larger, tougher and more specific — but stupidly, that would not be politically correct!” he tweeted.

And he touted his administration’s record battling ISIS.

“We have made more progress in the last nine months against ISIS than the Obama Administration has made in 8 years. Must be proactive & nasty!” he posted.

advertisement | advertise on newsday

Later Friday, after a tour of Joint Base Andrews in Maryland as it marked it the 70th anniversary of the Air Force, Trump told military personnel, “America and our allies will never be intimidated. We will defend our people, our nations and our civilization from all who dare to threaten our way of life.”

Trump then flew to New Jersey, where he will spend the weekend at his golf resort in Bedminster before he attends the United Nations General Assembly next week and makes his first address to the international body.

“I think there’s a lot of interest in how the U.S. is going to do. And they’re going to find out we are going to be solid, we’re going to be strong,” said Nikki Haley, the U.S. ambassador to the U.N. “No one is going to grip and grin. The United States is going to work.”