President Donald Trump scrambled Thursday to contain the fallout from US leaks of intelligence about the Manchester bombing, threatening prosecutions and dispatching his top diplomat to London to show solidarity with America's closest ally.

Trump described as "deeply troubling" the leaks from the probe, which called into question intelligence-sharing between the key partners and cast a pall over his meeting with Prime Minister Theresa May in Brussels.

After May warned the United States to keep classified information "secure," Trump ordered his Justice Department to look into how sensitive information — including photos of the remains of the explosive device used in Monday's concert bombing — made their way into US media.

Making a further gesture of good will, he dispatched his secretary of state, Rex Tillerson, to London to convey solidarity over the suicide attack, which left 22 dead.

Arriving at a NATO summit in Brussels, May warned that intelligence sharing with the United States was "built on trust."

Her spokesman later confirmed that May had discussed the matter with Trump, as the pair gathered for a photo with other leaders at the summit.

Read more: Trump berates NATO allies for not doing enough on terror, immigration and Russia

"She expressed the view that the intelligence sharing relationship we have with the US is hugely important and valuable, but that the information that we share should be kept secure."

The two countries are members of the "Five Eyes" intelligence alliance, along with Australia, New Zealand and Canada, highlighting the seriousness of the row.

In a statement issued by the White House before their meeting, Trump said: "There is no relationship we cherish more than the special relationship between the United States and the United Kingdom."

The British reprimand was all the more embarrassing as it came just weeks after Trump was reported to have shared classified intelligence about an ISIS bomb plot with the visiting Russian foreign minister. The sensitive information allegedly came from another close US ally, Israel, which had insisted it not be shared.

'Grave threat'

Visiting the military alliance's new $1.2 billion headquarters with fellow leaders later, Trump led a moment's silence for the victims of what he described as "a barbaric and vicious attack on our civilization."

Police in Manchester are trying to establish who made the bomb detonated by 22-year-old Salman Abedi on Monday, but they have stopped sharing intelligence information with US law enforcement agencies after key details were leaked to newspapers.

On Wednesday, The New York Times published forensic photographs showing components of the bomber's device strewn across the foyer of the Manchester Arena, enraging British politicians, intelligence agencies and police.

But the most damaging leak may well have been the release of the name of the suicide bomber, according to the BBC's diplomatic correspondent Jonathan Marcus. The British authorities had wanted to delay revealing Abedi's name while they were investigating the possibility of a wider network of terrorists connected to Abedi and his family.

"This is hugely damaging," Marcus said. "The [UK] police feel this is wholly inappropriate and detrimental to their efforts. There is currently a great urgency to push on with things and forestall the possibility of a separate attack."

In a Thursday statement made in Brussels, Trump — who is already struggling domestically to stem a tide of damaging leaks from law enforcement agencies — slammed the information coming out in the US media.

"These leaks have been going on for a long time and my administration will get to the bottom of this," he vowed. "The leaks of sensitive information pose a grave threat to our national security."

"I am asking the Department of Justice and other relevant agencies to launch a complete review of this matter, and if appropriate, the culprit should be prosecuted to the fullest extent of the law."

US Attorney General Jeff Sessions said he shared Trump's "deep concern."

"We have already initiated appropriate steps to address these rampant leaks," he said.

However, some members of the media disagree that there's been any wrongdoing by journalists. Andrew Seaman is chair of the ethics committee of the Society of Professional Journalists, and he says the Manchester coverage conforms with SPJ's best-practice guidelines in terms of taste and respect for the victims. That said, he does question other aspects of the releases.

“Traditionally what news organizations do is ... usually go to security officials in the United States, with sensitive information, to [ask], 'Does this actually harm our efforts or put US security at risk?' So part of that is to think, you know, how does this harm people? Not only directly, but also in a larger sense,” he said.

Britain's Foreign Office said that Tillerson would make his first official visit to the UK on Friday and meet his British counterpart Boris Johnson in "an expression of UK-US solidarity following the terrorist attack in Manchester."

In his NATO speech, Trump had also emphasized that bond. "Prime Minister May, all of the nations here today grieve with you and stand with you," he said.

Trump continued, "Innocent little girls and so many others were horribly murdered and badly injured while attending a concert — beautiful lives with so much great potential, torn from their families forever and ever."

Agence France-Presse contributed to this report.