Amid a barrage of gunfire, police stormed a cafe in the heart of Sydney early on Tuesday to end a 16-hour hostage siege by an Iranian-born gunman. Police said three people were killed - the gunman and two of the hostages - and four others were wounded.
Police raided the Lindt Chocolat Cafe after they heard a number of gunshots from inside, said New South Wales state police commissioner Andrew Scipione.
The gunman was identified as Man Haron Monis , who once was prosecuted for sending offensive letters to families of Australian troops killed in Afghanistan.
Scipione wouldn't say whether the two hostages who were killed - a 34-year-old man and a 38-year-old woman - were caught in crossfire, or shot by the gunman. Among the four wounded was a police officer shot in the face.
"Until we were involved in this emergency action, we believe that no one had been injured. That changed. We changed our tactic," he said, adding that there had been a total of 17 hostages taken in the cafe when the siege began.
Two Indians, Ankireddy Vishwakanth and Pushpendu Ghosh - both Infosys employees, were among the hostages, but escaped safely.
Ankireddy was safe, his father said in Guntur. Minutes later, external affairs minister Sushma Swaraj tweeted, "Another Indian hostage Shri Pushpendu Ghosh is also safe."
News of Ghosh being held captive came out only after Swaraj's tweet.
The standoff ended when a loud bang was heard from the cafe and five people ran out. Shortly after, police swooped in, amid heavy gunfire, shouts and flashes. A police bomb disposal robot also was sent into the building, but no explosives were found.
Police said an investigation was underway because police were involved in an incident in which people died.
Monis has long been on officials' radar. Last year, he was sentenced to 300 hours of community service for using the postal service to send what a judge called "grossly offensive" letters to families of soldiers killed in Afghanistan between 2007 and 2009.
At the time, Monis said his letters were "flowers of advice," adding: "Always, I stand behind my beliefs."
He was later charged with being an accessory to the murder of his ex-wife. Earlier this year, he was charged with the sexual assault of a woman in 2002. He has been out on bail on the charges.
"This is a one-off random individual. It's not a concerted terrorism event or act. It's a damaged goods individual who's done something outrageous," his former lawyer, Manny Conditsis, told Australian Broadcasting Corp.
"His ideology is just so strong and so powerful that it clouds his vision for common sense and objectiveness," Conditsis said.
The siege began around 9:45am in Martin Place, a plaza in Sydney's financial and shopping district that is packed with holiday shoppers this time of year. Many of those inside the cafe would have been taken captive as they stopped in for their morning coffees.
Throughout the day, several people were seen with their arms in the air and hands pressed against the window of the cafe, with two people holding up a black flag with the Shahada, or Islamic declaration of faith, written on it.
The Shahada translates as "There is no god but God and Muhammad is his messenger." It is considered the first of Islam's five pillars of faith, and is similar to the Lord's Prayer in Christianity. It is pervasive throughout Islamic culture, including the green flag of Saudi Arabia. Jihadis have used the Shahada in their own black flag.
Channel 10 news said it received a video in which a hostage in the cafe had relayed the gunman's demands. The station said police requested they not broadcast it, and Scipione separately asked all media that might be contacted by the gunman to urge him instead to talk to police.
A number of Australian Muslim groups condemned the hostage-taking in a joint statement and said the flag's inscription was a "testimony of faith that has been misappropriated by misguided individuals."
In a show of solidarity, many Australians offered on Twitter to accompany people dressed in Muslim clothes who were afraid of a backlash from the cafe siege. The hashtag #IllRideWithYou was used more than 90,000 times by late Monday evening.
Seven Network television news staff watched the gunman and hostages for hours from a fourth floor window of their Sydney offices, opposite the cafe.
The gunman could be seen pacing back and forth past the cafe's windows. Reporter Chris Reason said the man carried what appeared to be a pump-action shotgun, was unshaven and wore a white shirt and a black cap.
Some of the hostages were forced up against the windows.
"The gunman seems to be sort of rotating these people through these positions on the windows with their hands and faces up against the glass," Reason said in a report from the vantage point. "One woman we've counted was there for at least two hours - an extraordinary, agonising time for her surely having to stand on her feet for that long."
"When we saw that rush of escapees, we could see from up here in this vantage point the gunman got extremely agitated as he realised those five had got out. He started screaming orders at the people, the hostages who remain behind," he added.
Reason later reported that staff brought food from a kitchen at the rear of the cafe and the hostages were fed.
As night set in, the lights inside the cafe were switched off. Armed police guarding the area outside fitted their helmets with green-glowing night goggles.
"This is a very disturbing incident," Prime Minister Tony Abbott said. "It is profoundly shocking that innocent people should be held hostage by an armed person claiming political motivation."
Lindt Australia thanked the public for its support.
"We are deeply concerned over this serious incident and our thoughts and prayers are with the staff and customers involved and all their friends and families," the company wrote in a Facebook post.
Australia's government raised the country's terror warning level in September in response to the domestic threat posed by supporters of the Islamic State group. Counter-terror law enforcement teams later conducted dozens of raids and made several arrests in Australia's three largest cities - Melbourne, Sydney and Brisbane. One man arrested during a series of raids in Sydney was charged with conspiring with an Islamic State leader in Syria to behead a random person in downtown Sydney.
The Islamic State group, which now holds a third of Syria and Iraq, has threatened Australia in the past. In September, Islamic State group spokesperson Abu Mohammed al-Adnani issued an audio message urging so-called "lone wolf" attacks abroad, specifically mentioning Australia. Al-Adnani told Muslims to kill all "disbelievers," whether they be civilians or soldiers.
One terrorism expert said the situation appeared to be that of a "lone wolf" making his own demands, rather than an attack orchestrated by a foreign jihadist group.
"There haven't been statements from overseas linking this to extremist groups outside the country - that is quite positive," said Charles Knight, lecturer in the Department of Policing, Intelligence and Counter Terrorism at Australia's Macquarie University.
"The individual or individuals involved didn't kill early, which is part of the pattern of some recent international attacks. ...It seems to be shifting more into the model of a traditional hostage situation, rather than the sort of brutal attacks we've seen overseas."