Tougher laws could be needed to regulate the “nightmares of the online world”, Sir Keir Starmer said after it emerged Axel Rudakubana trawled the internet for extreme violent content before the Southport atrocity.

The Prime Minister said users could view a “tidal wave of violence” on the internet, and that there are tougher rules for films shown in cinemas unlike for the material freely available online.

Rudakubana had a PDF file entitled Military Studies In The Jihad Against The Tyrants, The Al Qaeda Training Manual, which led to him being charged with possession of information likely to be useful to a person committing or preparing to commit an act of terrorism, which he admitted on Monday.

When police searched Rudakubana’s home in Banks, Lancashire, after he carried out the Southport murders on July 29, they found knives and poison, as well as images and documents relating to violence, war and genocide on his devices.

The Prime Minister said he represented a new kind of threat, distinct from politically or ideologically motivated terrorism, with “acts of extreme violence perpetrated by loners, misfits, young men in their bedroom, accessing all manner of material online, desperate for notoriety”.

At a Downing Street press conference, Sir Keir said: “To face up to this new threat there are also bigger questions.

“Questions such as how we protect our children from the tidal wave of violence freely available online.

“Because you can’t tell me that the material this individual viewed before committing these murders should be accessible on mainstream social media platforms.

“That with just a few clicks, people can watch video after horrific video. Videos that in some cases are never taken down.

“No – that cannot be right.”

Sir Keir said the attack in Southport was not an “isolated, ghastly example”, pointing to evidence from mass school shootings in the US.

He said: “This is a new threat, individualised, extreme violence, obsessive, often following online viewing of material from all sorts of different sources.

“It is not a one-off. It is something that we all need to understand and have a shared undertaking to deal with within our society.

“That is not just the laws on terrorism, the framework on terrorism. It’s also the laws of what we can access online.

“We still have rules in place in this country about what we can see at a cinema, yet online you can access no end of materials.

“We have to ensure that we can rise to this new challenge, and that is what I’m determined to do.”