SYDNEY: A fatal shootout claimed by the Islamic State group was being treated as a terrorist attack, Australian police said Tuesday, as the prime minister condemned it as "shocking and cowardly".
A man of Somali background was killed in a gun battle with police when he opened fire following an hour-long standoff after taking an escort girl hostage at a serviced apartment block in the city on Monday evening.
It is alleged 29-year-old Yacqub Khayre, linked to a 2009 terror plot targeting an Australian army barracks, had first murdered a Chinese-born Australian man working as a receptionist in the foyer.
Police said he made statements "around Al-Qaeda" and called a local television station making similar comments, reportedly: "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.
"We don't yet know if this was something he was really planning or whether it was just an ad hoc decision that he's made just to go off tap like this."
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.
Prime Minister Malcolm Turnbull said the attack underlined the need to be constantly vigilant.
"This terrorist attack by a known criminal, a man who was only recently released on parole, is a shocking, cowardly crime," he said.
"It is a terrorist attack and it underlines the need for us to be constantly vigilant, never to be deterred, always defiant, in the face of Islamist terrorism."
Australian officials have grown increasingly concerned over the threat of extremist attacks.
They say they have prevented 12 attacks on home soil since the threat level was raised in September 2014, including a foiled Christmas Day plot in Melbourne last year, 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.
Khayre, whose parents were refugees from Somalia, was known to police and had a long criminal history.
He was charged and acquitted over a foiled plot to attack the Holsworthy Army barracks in Sydney in 2009.
Three of his co-accused were found guilty of planning the terrorist assault as payback for Australia's military action in the Middle East.
Khayre was released on parole late last year after serving time for intent to cause injury and arson, which Turnbull said was a concern given his background and something that would be reviewed.