Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

A gunman was killed and two hostages are dead after police stormed a chocolate shop in Sydney on Monday, ending a 16-hour siege by a self-professed sheik.

An intelligence source named the gunman as Man Haron Monis, who is also known as Sheikh Haron. He appeared to be making demands to negotiators through Facebook, YouTube and local news media.

In addition to the gunman, two hostages — a 34-year-old man and a 38-year-old woman — suffered fatal injuries, police said. They were pronounced dead at a hospital, New South Wales Police Commissioner Andrew Scipione said during an early morning news conference. Four others, including a police officer, suffered non-life-threatening injuries and were transported to the hospital.

Police stormed the chocolate shop after gunfire erupted early Tuesday morning local time (around 10 a.m. ET Monday.) Flashes of light could be seen coming from inside the cafe and glass had blown out onto the street.

Sydney siege is over. More details to follow. — NSW Police (@nswpolice) December 15, 2014

At least five of the 17 hostages escaped at that time. Another five had escaped hours earlier.

Scipione said police decided to enter the shop “as a result of gunfire inside the premises.” He said they believed that more lives would have been lost if police didn’t enter when they did but, he added, “until we were involved in this emergency action, we believe that no one had been injured.”

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

About 20 minutes after the building was stormed, a bomb-disposal robot was seen outside the entrance. No explosive devices were found, Scipione, adding that the incident was isolated. "Do not let this sort of incident bring about any sort of loss of confidence about working and visiting in our city," he said.

The drama began shortly after 9:45 a.m. local time (5:45 p.m. ET Sunday). A black flag used by Islamist groups in the Middle East had been shown in the window of the Lindt cafe.

Monis is described as a "cleric and activist" on a website in his name, which also likens him to WikiLeaks founder Julian Assange. He had been convicted of penning offensive letters to the families of Australian soldiers slain during the war in Afghanistan.

Will Geddes, a hostage negotiator and founder of International Corporate Protection, told NBC News the decision to storm the building would not have been taken lightly. "They would only move in like that if there was some serious threat to those inside," he said. "This had been going on for more than 16 hours, and in situations where you have a lone wolf there is the risk that the suspect can become very fatigued and volatile."

Earlier, Prime Minister Tony Abbott said the gunman was "claiming political motivation." Police said they were "operating according to our counter-terrorism protocols," and ex-FBI agent Don Borelli told TODAY that the suspect appeared to be inspired by ISIS.

Man Haron Monis arrived at a court in Sydney, Australia, on April 18, 2011. DEAN LEWINS / EPA, file

Speaking before the site was stormed, New South Wales Police Commissioner Andrew Scipione said "the very best negotiators in the world" were trying to end the standoff.

Asked about reports that hostages were being forced to use Facebook and YouTube to pass on the gunman’s demands, Scipione said: “There's no place on earth that doesn't have access to social media. Our plans are built around that.”

Scipione said reports of bomb threats in other parts of Sydney had been investigated but they not did not appear to be legitimate.

Chris Reason, a journalist with NBC News' Australian partner Channel 7, said the hostage-taker had forced victims to "stand against windows, sometimes two hours at a time." He added that the suspect seemed to be "getting extremely agitated" after the first five hostages left.

Nearby streets and office buildings were cleared and police were seen using ladders to rescue bystanders — including babies — from the building’s other floors. The U.S. Consulate in Sydney was evacuated and all U.S. personnel had been accounted for, the State Department told NBC News.

The Lindt Chocolate Cafe is in Martin Place, a busy tourist, transportation and shopping district home to several major banks — including the Reserve Bank of Australia — as well as the state Parliament. The nearby Sydney Opera House cancelled Monday night's performances.

The flag shown in the cafe's window as the hostage drama unfolded appeared to be the Tawhid Banner. NBC News terrorism analyst Evan Kohlmann, added that it was frequently used by Jabhat Al-Nusra and other armed Islamist groups in the region — but not ISIS.

The suspected gunman inside the Lindt cafe in Sydney, Australia, on Monday. Channel Seven / AFP - Getty Images

Grand Mufti Ibrahim Abu Mohamed, the highest Islamic office holder in Australia, said in a statement that the Muslim community was "devastated" by the incident, adding that "such actions are denounced in part and in whole in Islam."

The hostage incident comes after police carried out a series of major anti-terrorism raids throughout Sydney in September. ISIS spokesman Abu Muhammad al-Adnani has also urged Muslims in Australia to carry out "lone-wolf" attacks against civilians, according to terrorism analysts at the SITE Intelligence Group.

NBC News' Andrea Mitchell, Marc Smith, Matthew Grimson and Jason Cumming and Reuters contributed to this report.