Australian security forces on Tuesday stormed the Sydney cafe where several hostages were being held at gunpoint, in what looked like the dramatic denouement to a standoff that had dragged on for more than 16 hours.
Heavy gunfire and loud bangs rang out shortly after 2 a.m. local time (1500 GMT on Monday), and moments earlier at least six people believed to have been held captive had managed to flee the scene.
Medics moved in and took away several injured people on stretchers, but it was not clear whether they included the gunman who had been named by a police source only minutes earlier.
He was identified as Man Haron Monis, an Iranian refugee and self-styled sheikh facing multiple charges of sexual assault.
He was also found guilty in 2012 of sending offensive and threatening letters to families of eight Australian soldiers killed in Afghanistan, as a protest against Australia's involvement in the conflict, according to local media reports.
During the siege, hostages had been forced to display an Islamic flag, igniting fears of a jihadist attack.
"There's no operational reason for that name to be held back by us now," said a police source, who declined to be identified, when asked to confirm reports the hostage taker was Monis.
At least five hostages were released or escaped on Monday, with terrified cafe workers and customers running into the arms of paramilitary police.
A further 15 or so hostages were understood to have been holed up inside the cafe, said Chris Reason, a reporter at Channel Seven, whose office is opposite the cafe.
Australia, a staunch ally of the United States and its escalating action against the Islamic State in Syria and Iraq, is on high alert for attacks by home-grown militants returning from fighting in the Middle East.
News footage showed hostages holding up a black and white flag displaying the Shahada - a testament to the faith of Muslims. The flag has been popular among Sunni Islamist militant groups such as Islamic State and al Qaeda.
The incident forced the evacuation of nearby buildings and sent shockwaves around a country where many people were turning their attention to the Christmas holiday following earlier security scares.
In September, anti-terrorism police said they had thwarted an imminent threat to behead a random member of the public and days later, a teenager in the city of Melbourne was shot dead after attacking two anti-terrorism officers with a knife.
The siege cafe is in Martin Place, a pedestrian strip popular with workers on a lunch break, which was revealed as a potential location for the thwarted beheading.
"We're possibly looking at a lone wolf who has sympathies to global jihad or someone with mental health issues in search of a cause," said Adam Dolnik, a professor at the University of Wollongong who has trained Sydney police in hostage negotiations. "This is all about attention."
In the biggest security operation in Sydney since a bombing at the Hilton Hotel killed two people in 1978, major banks closed their offices in the central business district and people were told to avoid the area.
Muslim leaders urged calm. The Australian National Imams Council condemned "this criminal act unequivocally" in a joint statement with the Grand Mufti of Australia.
Concerns about an attack in Australia by Islamists have been growing for more than a year, with the security agency raising its national terrorism public alert to "high" in September.