Story highlights The hostages who died are identified as Katrina Dawson and Tori Johnson

All of those injured are described by police in stable condition

"It will take time to clarify exactly what happened ... and why," PM says

The gunman's social media postings reflect a radical Sunni extremist theology

The deadly siege of a central Sydney cafe has ended but the investigation is just beginning.

Australian authorities stormed the cafe where a self-styled Muslim cleric had been holding hostages early Tuesday, killing the gunman. They moved in some 16 hours after the siege began, after hearing gunfire inside the Lindt Chocolate Cafe, New South Wales police Commissioner Andrew P. Scipione told reporters.

Two of the 17 hostages initially held by the gunman died, according to Scipione. They were later identified as Katrina Dawson, 38, and Tori Johnson, 34. Other people were injured, including a police officer who suffered a wound to the face from gunshot pellets. All were described by police to be in stable condition.

"Understandably, there is a lot of speculation, but it will take time to clarify exactly what happened ... and why," Australian Prime Minister Tony Abbott told reporters Tuesday.

Man Haron Monis.

What did the gunman want? Why did he choose the cafe as his target?

"There is nothing more Australian than dropping in at the local cafe for a morning coffee, and it's tragic beyond words that people going about their everyday business should have been caught up in such a horrific incident," Abbott said.

He offered his condolences to people caught in the attack and to their loved ones.

"These events do demonstrate that even a country as free as open as generous and as safe as ours is vulnerable to acts of politically motivated violence," the Prime Minister said. "But they also remind us that Australia, and Australians are resilient and we are ready to respond."

Gunman had violent history

JUST WATCHED Australian PM: Hearts go out to hostages Replay More Videos ... MUST WATCH Australian PM: Hearts go out to hostages 02:47

JUST WATCHED How the Sydney hostage siege unfolded Replay More Videos ... MUST WATCH How the Sydney hostage siege unfolded 02:38

JUST WATCHED Police: Hostage safety is our top priority Replay More Videos ... MUST WATCH Police: Hostage safety is our top priority 03:43

The gunman was identified as Man Haron Monis by an official with direct knowledge of the situation. According to his social media posts, the hostage-taker appears to have embraced a radical Sunni theology.

Abbott told reporters that the gunman was already well-known to authorities, and that he had a "long history of violent crime, infatuation with extremism and mental instability."

Before the raid, Monis had demanded a flag and phone call with Abbott, CNN affiliate Sky News Australia reported. He made the demands through hostages who contacted media organizations, Sky News reported.

Some hostages had also reportedly posted messages to social networking sites and the YouTube online video service. Police urged media early Tuesday not to show the videos.

Monis, also known as Sheikh Haron, pleaded guilty in 2013 to writing letters to relatives of Australian service members saying they were "Hitler's soldiers," according to Australian media reports.

He was believed to be acting alone, and he didn't appear to be part of a broader plot, additional U.S. law enforcement and intelligence sources said.

How the siege unfolded

Hundreds of police officers, including snipers, surrounded the cafe in Sydney's central business district shortly after the gunman took over the building at 10 a.m. Monday (6 p.m. ET Sunday).

Chilling images from Australian media showed people, believed to be hostages, with their hands pressed against the cafe's windows. They were holding up a black flag with Arabic writing on it reading, "There is no God but God and Mohammed is the prophet of God."

Photos: Photos: Sydney cafe siege Photos: Photos: Sydney cafe siege Sydney cafe siege – A message of condolence is written on the pavement at Martin Place, Sydney on Wednesday, December 17. #illridewithyou became a trending hashtag on Twitter during the siege, expressing solidarity with Australian Muslims in the wake of deadly siege at the Lindt Cafe in Sydney. Hide Caption 1 of 23 Photos: Photos: Sydney cafe siege Sydney cafe siege – A woman walks past flowers placed by people as a mark of respect for the victims of Martin Place siege on Tuesday, December 16. Hide Caption 2 of 23 Photos: Photos: Sydney cafe siege Sydney cafe siege – Members of the Muslim community show their respect at Martin Place on December 16. Hide Caption 3 of 23 Photos: Photos: Sydney cafe siege Sydney cafe siege – Prime Minister Tony Abbott arrives with his wife Margaret to pay their respects at Martin Place on December 16. Hide Caption 4 of 23 Photos: Photos: Sydney cafe siege Sydney cafe siege – Australian flags fly at half mast on Sydney Harbour Bridge on December 16 following the fatal siege. Hide Caption 5 of 23 Photos: Photos: Sydney cafe siege Sydney cafe siege – An injured hostage is carried to an ambulance from a cafe in Sydney on December 16. Gunfire erupted early Tuesday as police stormed the Lindt Chocolate Cafe, where a gunman had been holding hostages since Monday morning. Hide Caption 6 of 23 Photos: Photos: Sydney cafe siege Sydney cafe siege – Hostages run toward police officers on December 16. Hide Caption 7 of 23 Photos: Photos: Sydney cafe siege Sydney cafe siege – A police officer and a paramedic escort a hostage away from the scene of the siege on December 16. Hide Caption 8 of 23 Photos: Photos: Sydney cafe siege Sydney cafe siege – An injured hostage is wheeled to an ambulance after shots were fired during the raid on the cafe. Hide Caption 9 of 23 Photos: Photos: Sydney cafe siege Sydney cafe siege – Two armed police officers stand ready to enter the cafe on December 16. Hide Caption 10 of 23 Photos: Photos: Sydney cafe siege Sydney cafe siege – A hostage stands by the front entrance of the cafe as she turns off the lights on Monday, December 15. Hide Caption 11 of 23 Photos: Photos: Sydney cafe siege Sydney cafe siege – A hostage runs toward police on December 15. She was one of five people seen fleeing the cafe. Hide Caption 12 of 23 Photos: Photos: Sydney cafe siege Sydney cafe siege – Police gather near the cafe on December 15. Hide Caption 13 of 23 Photos: Photos: Sydney cafe siege Sydney cafe siege – Hostages behind the cafe's window hold up a black flag with Arabic script on December 15. Hide Caption 14 of 23 Photos: Photos: Sydney cafe siege Sydney cafe siege – A police officer listens to a radio on December 15. Hide Caption 15 of 23 Photos: Photos: Sydney cafe siege Sydney cafe siege – Two hostages make it to safety outside the cafe on December 15. Hide Caption 16 of 23 Photos: Photos: Sydney cafe siege Sydney cafe siege – A police sniper walks to his vehicle on December 15. Hide Caption 17 of 23 Photos: Photos: Sydney cafe siege Sydney cafe siege – A journalist reports on the situation in Sydney. Hide Caption 18 of 23 Photos: Photos: Sydney cafe siege Sydney cafe siege – Armed police are seen outside the cafe on December 15. Hide Caption 19 of 23 Photos: Photos: Sydney cafe siege Sydney cafe siege – People rush past armed police near the cafe on December 15. Hide Caption 20 of 23 Photos: Photos: Sydney cafe siege Sydney cafe siege – Police close a street near the scene on December 15. Hide Caption 21 of 23 Photos: Photos: Sydney cafe siege Sydney cafe siege – Police officers talk at the scene on December 15. Hide Caption 22 of 23 Photos: Photos: Sydney cafe siege Sydney cafe siege – Armed police patrol near the Sydney Opera House. Major landmarks in Sydney were evacuated as police responded to the hostage situation. Hide Caption 23 of 23

JUST WATCHED Australian Police: We have had contact Replay More Videos ... MUST WATCH Australian Police: We have had contact 03:12

JUST WATCHED Anatomy of the Sydney hostage situation Replay More Videos ... MUST WATCH Anatomy of the Sydney hostage situation 01:57

Five hostages sprinted out of the cafe toward heavily armed police officers several hours into the standoff, sending the gunman into a tirade, according to an Australian reporter.

Chris Reason, a correspondent for CNN affiliate Seven Network, said the gunman became "extremely agitated" when he realized what had happened and "started screaming orders" at the remaining hostages.

Reason said he could see the gunman pacing past the cafe's windows from his vantage point at the network's nearby offices. He described the man as unshaven, wearing a white shirt and black cap and carrying a shotgun.

As night fell, lights went out in the cafe, Reason reported.

After a tense night, police could be seen early Tuesday throwing flash-bang grenades into the cafe in video aired by Seven Network. Gunfire erupted amid the chaos.

A national security source in the United States said that a team of Australian special forces troops and police had entered the Lindt Chocolate Cafe from two directions and killed the gunman.

Video captured medics working on some people and others being carried away on stretchers.

On Tuesday, the hostages who died were identified as Dawson and Johnson.

JUST WATCHED Remembering the victims killed in Sydney Replay More Videos ... MUST WATCH Remembering the victims killed in Sydney 01:28

"Katrina was one of our best and brightest barristers who will be greatly missed by her colleagues and friends at the NSW Bar," the New South Wales Bar Association said in a statement. "She was a devoted mother of three children and a valued member of her floor and of our bar community. Our thoughts are with her family at this time."

Johnson's family also released a statement. It read, in part: "We are so proud of our beautiful boy Tori, gone from this Earth but forever in our memories as the most amazing life partner, son and brother we could ever wish for."