Several witnesses heard Fuller screaming abuse during his “rampage”, including one who reported him saying: “All Muslims should die. White supremacists rule. I’m going to murder a Muslim.”

In a Facebook post just before the spree, Fuller praised alleged Christchurch gunman Brenton Tarrant, adding: “I am English, no matter what the government say kill all the non-English and get them all out of our of England.”

Judge Lodder told Fuller he was “motivated by the cause of white supremacy, and his personal anti-Muslim sentiments”, adding: “This was a terrorist act.”

“I find that it was your purpose to strike fear into the heart of people you described as non-English, in particular Muslims,” he said.

The judge added: “It is immaterial that there is no evidence that you were a member of, or subscribed to, to any particular group or organization.

“In my judgement a terrorist-related offence may be committed by a person acting alone, on his own initiative, and without any significant planning.”

In a police interview, Fuller, who has a British bulldog tattoo, denied being racist and said he could not remember what he had done.

After the attack he tested positive for cannabis and alcohol and told detectives he had drunk a large bottle of cider and three cans of strong Special Brew lager.

But the judge said a blood sample taken after the attack showed that Fuller – a regular drinker – was not intoxicated to a high degree.

Fuller, of Viola Avenue, carried out his attack the day after the murder of 51 Muslim worshippers in New Zealand by a white supremacist, who livestreamed most of the shootings online.

A video excerpt of the Christchurch massacre was found on Fuller’s mobile phone, the court heard.

‘Extreme right-wing view’

Fuller had previously admitted further charges of carrying a weapon, affray and racially aggravated harassment, alarm or distress.

He was jailed for 18 years and nine months on Tuesday, with an additional five-year extended sentence.

Outside court, Supt Andy Rundle, from Surrey Police, said it was clear Fuller had become radicalised and developed “an extreme right-wing view”.

Det Ch Supt Kath Barnes, head of counter-terrorism at Policing South East, said Fuller was “clearly an incredibly angry and dangerous individual who went out of his way looking for someone of non-white appearance to attack”.