Australia police said a man who fatally stabbed another and injured two in what they described as a terrorist attack in central Melbourne had also planned to set off an explosion.

Hassain Khalif Shire Ali, 30, had his passport cancelled in 2015 after it was learned he planned to travel to Syria, police said.

The attack occurred on Friday when Shire Ali got out of a pick-up vehicle, which he then set on fire, and stabbed three men, one of whom died at the scene, horrifying hundreds of onlookers during the afternoon rush hour in Australia’s second-biggest city.

Victoria state Police Commissioner Graham Ashton said that Shire Ali, who was shot by police and died in a hospital, had also planned for his vehicle to explode, but barbecue gas cylinders in the back of his pick-up failed to ignite.

Australia Melbourne ShootingPolice on street corner after the incident in Melbourne, Australia (Australian Broadcasting Corporation via AP)

“It looks like he’s attempted to ignite a fire in the car, we believe at this stage with a view to igniting those canisters with some sort of explosion, but that didn’t eventuate,” Mr Ashton told reporters.

Shire Ali, who moved to Australia with his family from Somalia in the 1990s, was known to police and the federal intelligence authority ASIO. He had a criminal history for cannabis use, theft and driving offences,Mr Ashton said.

Australian Federal Police Assistant Commissioner Ian McCartney told a media briefing on Saturday it was believed the attack was inspired by IS, though it was thought Shire Ali had no direct links to the organisation.

“It’s fair to say he was inspired. He was radicalised, with the rise of the caliphate and the propaganda that was put out on the internet. We’re not saying there was direct contact. We’re saying it was more from an inspirational perspective,” Mr McCartney said.

Mr McCartney said the incident was a “reality check” for security agencies that “even with the fall of the (IS) caliphate … the threat continues to be real.”

Prime Minister Scott Morrison said “radical, violent, extremist Islam” poses the greatest threat to Australia’s national security.

“Here in Australia, we would be kidding ourselves if we did not call out the fact that the greatest threat of religious extremism in this country is the radical and dangerous ideology of extremist Islam,” he said.

Mr Morrison said he had long-standing relationships with the Muslim community and it was them who had raised with him concerns about radicalism in recent years.

Shire Ali had family and associates who were also known to police. His brother Ali Khalif Shire Ali is currently on remand awaiting trial next year for allegedly planning an attack, Mr Ashton said.

The Islamic State group claimed responsibility for the attack in a statement released through its Aamaq media arm, but provided no evidence.

It said the man was an Islamic State fighter and had responded to IS calls for attacks in countries that are part of the international coalition fighting the militants in Syria and Iraq.

Police and civilians had tried unsuccessfully to subdue Shire Ali during Friday’s attack, before police shot him in the chest.

A man aged 74, who had been stabbed in the face, died at the scene. Two other men, aged 26 and 58, are in a hospital with what police describe as non-life threatening injuries.

Mr Ashton also said police had searched two Melbourne properties on Saturday in relation to the attack, but that police did not believe there were any ongoing threats to the public.