SYDNEY, Australia -- Australia's prime minister said Thursday that a deadly siege in a Sydney cafe may have been preventable, as the chorus of critics demanding to know why the gunman was out on bail despite facing a string of violent charges grew louder.

Man Haron Monis, a 50-year-old Iranian-born, self-styled cleric with a lengthy criminal history, burst into a downtown Sydney cafe on Monday wielding a shotgun, taking 17 people hostage. The siege ended 16 hours later when police stormed into the cafe to free the captives, two of whom were killed in a barrage of gunfire, along with Monis.

"This has been a horrific wake-up call," Prime Minister Tony Abbott told Macquarie Radio. "This was an atrocity -- it may well have been a preventable atrocity, and that's why this swift and thorough review is so important."

Abbott has ordered a sweeping government review of the siege and the events leading up to it, including why Monis was out on bail and how he obtained a shotgun despite the country's tough gun laws.

Court documents detail Monis' long history with the law. In 2011, Noleen Hayson Pal -- his ex-partner and mother of their two sons -- told police Monis had threatened her life. He was subsequently charged with stalking and intimidation intending to cause fear of physical or mental harm.

Pal testified in January 2012 that Monis said to her, "If I don't get to see the boys more than I am seeing them now, I'll make sure you pay for it -- even if it means I have to shoot you."

Pal said she feared he would carry through on his threat, noting that he'd once told her he had a gun license. She said he grew increasingly paranoid when "he started getting more into his Islamic activities," insisting on drawing the blinds and shutting all the doors when he visited her house. She also accused him of slapping their eldest son in the face.

"He's always saying to me that people are watching, people are hearing our conversations," she testified.

Monis was ultimately found not guilty of the charge. A year later, Pal was stabbed to death and set on fire.

Police charged Monis' then-partner, Amirah Droudis, with Pal's murder, and charged Monis as an accessory. Both were out on bail on the charges when Monis launched his siege on the cafe. He was also facing 40 charges of sexual assault, and had been granted bail on those charges as well.

Monis was convicted and sentenced last year to 300 hours of community service for sending what a judge called "grossly offensive" letters to families of soldiers killed in Afghanistan between 2007 and 2009.

Three days before he began his siege, Australia's highest court refused to hear his appeal of the convictions for sending the letters. The next business day, Monis walked into the Lindt Chocolat Cafe, a short stroll from the courtroom where the ruling was delivered.

"Just like about everyone else from the premier down, I was incredulous and exasperated at this," Abbott said. "This guy has a long history of violence, a long history of mental instability, he has a long criminal record and obvious infatuation with extremism. It was extraordinary he was on our streets."

New South Wales Premier Mike Baird concurred, saying, "I'm as outraged as everyone else."

New South Wales Attorney General Brad Hazzard said he has asked the director of public prosecutions to review all cases where bail has been granted and where there are any similarities to Monis' case.

"We have always believed that in this case, with this offender, he should have always been 'bail refused,"' New South Wales Police Commissioner Andrew Scipione said.

Katrina Dawson, a 38-year-old lawyer, and Tori Johnson, the cafe's 34-year-old manager, were killed during Monis' rampage. Officials have not said if they died in crossfire as police stormed in or were shot by their captor. Their autopsies were expected to be completed Thursday.

Martin Place, where the Lindt cafe is located, smelled and looked more like a fragrant field than a downtown plaza as people continued leaving thousands of bouquets of flowers to honour the victims.

Bravo Child, a poet holding a sign offering free hugs, said he'd hugged about 500 people after starting a Facebook campaign, Embrace in Martin Place. He said some people had laughed and others had cried while hugging him.

"When people sit at home and watch the TV there's so much confusion and fear," he said, adding he wanted to "bring some balance and some positivity."

Several Muslim women wearing hijabs were also reaching out to people in the plaza.

Esha Deeb said she was there to represent the parent council of Arkana College, an independent Islamic school, and to pay her respects to the victims. While most people had been supportive, she said her group had encountered some negative reactions, including nasty comments and pushing. She said she was trying to turn the other cheek, as her religion suggested.

At least three of the hostages remained in Sydney area hospitals Thursday, according to hospital spokeswomen.