WASHINGTON – President Donald Trump‘s suggestion that London police could have done more to prevent a homemade bomb explosion drew speedy pushback Friday from British Prime Minister Theresa May.

In a series of early-morning tweets, Trump called the explosion another attack “by a loser terrorist.” He also offered implied criticism of law enforcement, saying “these are sick and demented people who were in the sights of Scotland Yard. Must be proactive!”

Asked about Trump’s comments, May said: “I never think it’s helpful for anybody to speculate on what is an ongoing investigation.”

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! — Donald J. Trump (@realDonaldTrump) September 15, 2017

Loser terrorists must be dealt with in a much tougher manner.The internet is their main recruitment tool which we must cut off & use better! — Donald J. Trump (@realDonaldTrump) September 15, 2017

The bomb exploded on a packed train during morning rush hour Friday, leaving at least 22 people injured but no one with life-threatening injuries. Police said the explosion was a terrorist attack, the fifth in Britain this year.

Story continues below advertisement

Trump told reporters Friday morning that he had been briefed on the explosion, but did not provide further details.

The White House said Trump and May spoke Friday. During the call, Trump offered sympathies and “pledged to continue close collaboration with the United Kingdom to stop attacks worldwide targeting innocent civilians and to combat extremism.” The brief statement did not say if the two discussed Trump’s tweet.

WATCH: Video, photos circle online of alleged IED used in London metro attack

0:38 Video, photos circle online of alleged IED used in London metro attack Video, photos circle online of alleged IED used in London metro attack

Trump has lobbed trans-Atlantic criticism after previous attacks.

In June, after attacks in the London Bridge area that claimed seven lives, London Mayor Sadiq Khan warned locals not to be alarmed by the large presence of armed officers on the capital’s streets. Trump accused the mayor – whom he has long sparred with – on Twitter of suggesting there was “no reason to be alarmed” by the attack itself.

Story continues below advertisement

READ MORE: At least 18 injured in ‘terrorist’ incident on London subway, British authorities say

The president also has had dust-ups with allies over use of intelligence.

In May, British Prime Minister Theresa May protested to Trump after U.S. officials leaked information about a deadly bombing in Manchester. Photos showing crime scene evidence appeared in U.S. media; the bombing suspect’s name was revealed while British officials were still withholding it. Trump said May was “very angry” over the leaks.

Around that time, the president himself came under fire for reportedly disclosing classified material gathered by close ally Israel. Trump shared the information with Russian officials in an Oval Office meeting.

WATCH: British police confirm explosion, fire aboard London metro being treated as ‘terrorist incident’

1:06 British police confirm explosion, fire aboard London metro being treated as ‘terrorist incident’ British police confirm explosion, fire aboard London metro being treated as ‘terrorist incident’

Trump’s rapid reaction Friday contrasts with a statement he made defending his muted response to the violence in Charlottesville last month, when he said he wanted to ensure he had the facts and not make a “quick statement.”

Story continues below advertisement

Trump also used the moment to argue on Twitter that his travel ban targeting six mostly Muslim nations should be “far larger, tougher and more specific – but stupidly, that would not be politically correct!”

On Twitter, Trump promoted his handling of extremist militants and said the government should cut off the internet to such groups.

The travel ban into the United States should be far larger, tougher and more specific-but stupidly, that would not be politically correct! — Donald J. Trump (@realDonaldTrump) September 15, 2017

“Loser terrorists must be dealt with in a much tougher manner. The internet is their main recruitment tool which we must cut off & use better!,” said Trump. And he argued that his administration has “made more progress in the last nine months against ISIS than the Obama Administration has made in 8 years.”

Trump concluded: “Must be proactive & nasty!”

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! — Donald J. Trump (@realDonaldTrump) September 15, 2017

The tough talk came a day after Trump drew conservative criticism for pursuing an agreement with Democrats on young immigrants who had been living in the country illegally. Trump said Thursday he was “fairly close” to an agreement that could protect these so-called “dreamers” while also adding border security, as long as his wall with Mexico would be separately addressed.

Trump’s travel ban has been ensnared in the courts since the president’s first attempt to enact the policy in January. The Supreme Court is scheduled to hear arguments on Oct. 10 on the legality of the bans on travellers from six mostly Muslim countries and refugees anywhere in the world.

Story continues below advertisement

It’s unclear, though, what will be left for the court to decide. The 90-day travel ban on visitors from Iran, Libya, Somalia, Sudan, Syria and Yemen lapses in late September, and the 120-day refugee ban will expire a month later. The administration has yet to say whether it will seek to renew the bans, make them permanent or expand the travel ban to other countries.