Australian police Tuesday said they were treating a deadly shooting and siege in Melbourne as a terrorist incident after the Islamic State group claimed responsibility.
A man of Somali background was killed in a gun battle with police when he opened fire after taking an escort girl hostage at an apartment block in the city on Monday evening.
It is alleged Yacqub Khayre, 29, had first killed a Chinese-born Australian man in the foyer.
Police said he had made statements "around Al-Qaeda" and called a local television station making similar comments, reportedly saying: "This is for IS, this is for Al-Qaeda."
"We're treating this as a terrorism incident," Victoria Police chief commissioner Graham Ashton said, but added that investigations were still ongoing into whether it was planned or random.
"We're not seeing anything indicating that he's got some message from overseas to do this at all but, again, early days. We've got material that's seized. We'll go through that and work it out."
The Amaq news agency -- which is affiliated with the so-called Islamic State group -- carried a statement claiming responsibility.
"The executor of the Melbourne attack in Australia is a soldier of the Islamic State and he carried out the attack in response to appeals to target citizens of coalition states," it said.
Ashton said IS "always tend to jump up and claim responsibility every time something happens" and it was too early to determine whether they were involved.
Authorities had responded to reports of an explosion at the building -- which turned out to be a gunshot -- in the affluent beach suburb of Brighton and arrived to find a dead body in the foyer.
"Subsequently he (Khayre) came out of the apartment with a shotgun and commenced to fire at police at the entry-way to the apartments..." Ashton said.
"He's exchanged gunfire with police and has been fatally shot by police at the scene."
The escort escaped unharmed but three police were hurt in the firefight, although their injuries were not life-threatening.
Australian officials have grown increasingly concerned over the threat of militant attacks.
They say they have prevented 12 attacks on home soil since the threat level was raised in September 2014, with more than 60 people charged.
But four have gone ahead, including the murder of a Sydney police employee in 2015 by a 15-year-old boy.