SYDNEY — An attacker who fatally stabbed one person and injured two others in central Melbourne had also planned to set off an explosion, Australian police said. Hassain Khalif Shire Ali, 30, had his passport canceled 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 pickup vehicle, which he then set on fire, and stabbed three men, one of whom died at the scene. The attack horrified hundreds of onlookers during the afternoon rush hour in Australia's second-biggest city.

Victoria state Police Commissioner Graham Ashton said Shire Ali, who was shot by police and died in a hospital, had also made an "unsophisticated" plan for his vehicle to explode to cause many more fatalities. He had placed several barbecue gas canisters in the back of his pickup, with the outlet valves open, but they had failed to ignite.

Get Breaking News Delivered to Your Inbox

"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," 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, Ashton said.

Australian Federal Police Assistant Commissioner Ian McCartney told a media briefing on Saturday it was believed the attack was inspired by the Islamic State of Iraq and Syria (ISIS), though it was thought Shire Ali had no direct links to the organization.

First responders work the scene of the fatal stabbing in Melbourne on Nov. 9, 2018. REUTERS

"It's fair to say he was inspired. He was radicalized, 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," McCartney said.

McCartney said the incident was a "reality check" for security agencies that "even with the fall of the (ISIS) 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.

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, Ashton said.

ISIS claimed responsibility for Friday's attack but provided no evidence. It said the man was an ISIS fighter and had responded to the group's 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 before he was shot in the chest by a police officer, who Ashton said only graduated from the police academy three months ago.

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.

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. It's the second time in four years Australia has witnessed militant violence.

In December 2014, a 17-hour siege in which a gunman took 18 people hostage in a Sydney cafe ended with two hostages dead and the assailant killed by police. Though the erratic gunman demanded that police deliver him an Islamic State flag at the outset of the crisis, there was no evidence he had established contact with the militant group. However, at a later inquest, the coroner of New South Wales state said the gunman's actions fell "within the accepted definition of terrorism."

Melbourne was also the scene of two fatal car-ramming incidents last year, but neither was linked by police to terrorism.

Ashton said there is no suggestion Shire Ali was inspired by James "Dimitrious" Gargasoulas, who faced court this week on six charges of murder over the first ramming attack, in January 2017.