Australian police are treating as a "terrorist incident" a Melbourne siege in which a gunman was killed.
Heavily armed officers arrived at an apartment building on Monday after reports of an explosion and found one man already dead in the foyer.
Another man, Yacqub Khayre, was armed with a shotgun and holding a woman inside the building against her will.
Khayre, 29, called a broadcaster during the siege to say he was acting in the name of the Islamic State (IS) group.
A news outlet for the group claimed it had carried out the attack, but police said there was no evidence of it co-ordinating with Khayre.
Three police officers suffered injuries after Khayre engaged them in a firefight in which he was shot dead. The hostage was rescued unharmed.
Victoria Police Chief Commissioner Graham Ashton said the victim who died, a building employee, was "in the wrong place at the wrong time".
Gunman known to police
Authorities were investigating whether Khayre, a Somali-born Australian citizen, may have lured officers to the wealthy suburb of Brighton with the aim of confronting them.
Mr Ashton said comments Khayre made referencing IS and al-Qaeda had prompted the terrorism investigation.
"We do not yet know if this was something he was really planning or whether it was just an ad hoc decision that he has made just to go off tap like this," Mr Ashton said.
"They (IS) always tend to jump up and claim responsibility every time something happens," Mr Ashton said.
He said Khayre had been acquitted over a foiled plot to attack a Sydney army barracks in 2009.
He had "a long criminal history" and was on parole after being released from jail on a separate offence last year, Mr Ashton said.
The gunman had arranged to meet the woman through an escort service before taking her hostage, he said.
Neighbours and people in the area described hearing loud gunfire at the scene.
"Everyone just panicked," one witness, Luke Fourniotis, told the Herald Sun.
"I started running but I didn't know where the shots were coming from so I had this thought: 'Are they shooting at us?' My heart was in my throat."
Nearby resident Graeme Hisgrove said heavily armed police officers went through his backyard during the operation.
"We were just in the front room of the house and all the rapid fire started, so we all hit the deck on the floor and just didn't know what was going on," he told the Australian Broadcasting Corp.
On Tuesday, police raided a house reportedly shared by Khayre and his mother, seizing computers, other electronic devices and books.
Anger over parole
Prime Minster Malcolm Turnbull said the case raised "grave concerns" about the parole system which he said would be addressed.
"How was this man on parole? He had a long record of violence. A very long record of violence," Mr Turnbull said.
"These are important issues and Australians need to be assured that people who are a threat to their safety are not being released on parole."
Mr Turnbull said Australia's official terror threat level would remain at "probable".
Last month, an Australian coroner criticised a decision which allowed bail to a gunman behind Sydney's deadly cafe siege in 2014.