In a blitz-style assault early Tuesday, Australian riot police ended a 16-hour hostage crisis as frightened captives rushed onto the streets amid intense gunfire that fatally wounded the self-styled Muslim cleric who held them.

A police statement said two people — a 34-year-old man and a 38-year-old woman — died during the predawn police operation in downtown Sydney. The statement also said that a third person, described by police officials as the hostage-taker, was pronounced dead after being taken to a hospital.

Four others were injured, including a police officer who suffered a gunshot wound to the face.

The motives for the hostage-taking at the Lindt Chocolate Cafe remain unclear. But the gunman was convicted last year of sending hate mail to families of Australian troops killed in Afghanistan and was facing other charges, including in connection with the killing of his former wife.

The decision to carry out the police raid was apparently prompted by worries that the gunman, identified as Iranian-born Man Haron Monis, was growing uneasy and had begun corralling some captives in a section of the cafe.

“They made the call because they believed that, at that time, if they didn’t enter, there would have been many more lives lost,” said Andrew Scipione, commissioner of the New South Wales state police.

The long showdown captured the world’s attention and raised questions about whether it was a “lone wolf” attack inspired by calls from militant groups such as the Islamic State. Earlier this month, when a woman in the United Arab Emirates fatally stabbed an American teacher, Abu Dhabi officials partially blamed the slaying on the influence of radical Islamists.

The Islamic State and other extremist groups have threatened Australia with violence for its participation in the U.S.-led campaign against Islamist militants in Iraq and Syria. Australia, in response, has imposed new security measures in recent months and made several arrests of suspects accused of plotting acts of violence.

The raid at the cafe began without warning. Suddenly, a series of bangs sounded — possibly from stun grenades — and a barrage of gunfire followed. Police poured in, weapons drawn and face masks in place. Hostages raced in the other direction, some with hands raised.

Scipione said the gunman initially took 17 people hostage. Five people later escaped as the drama unfolded, including scenes in which captives were forced to hold a black banner with Arabic writing to the window.

Monis, 50, a self-proclaimed “spiritual healer,” was sentenced to 300 hours of community service for sending the threatening and harassing letters to the families of the fallen military personnel. He was later charged with being an accessory to the murder of his ex-wife. He was also charged with sexually assaulting a woman in 2002. He was out on bail, the Reuters news agency reported.

Australia’s 9News said Monis — who also went by the names Sheik Haron and Mohammad Hassan Manteghi — moved to Australia in 1996 and was granted political asylum.

Videos posted to YouTube show Man Haron Monis, the man who is a suspect in the cafe hostage standoff in Sydney, wearing chains and holding a sign that reads, "I have been Tortured In Prison For My Political Letters." (The Washington Post)

His Web site shows graphic images of children who the site claims were killed by U.S. and Australian airstrikes. The site insists that Monis “supports his Muslim brothers [and] sisters” but is not affiliated with specific groups.

Still, authorities are certain to explore possible connections to Islamist factions or propaganda. Before the raid, Prime Minister Tony Abbott said only that the hostage-taker was “claiming political motivation.”

“The whole point of politically motivated violence is to scare people out of being themselves,” Abbott said.

Monis’s former attorney, Manny Conditsis, described him as an “isolated figure,” according to the Australian Broadcasting Corp.

“His ideology is just so strong and so powerful that it clouds his vision for common sense and objectiveness,” the lawyer said.

The events on Martin Place — near the landmark sail-shaped Sydney Opera House — began Monday morning as rush hour was just starting to quiet. Witnesses said they saw a man with a gun walk into the cafe about 9:45 a.m.

Soon, local TV stations showed footage shot through the cafe’s windows of people with their hands raised or palms pressed against the glass. Two held up a black banner bearing Arabic writing that expressed the Shahada, the Islamic declaration of faith: “There is no god but Allah; Muhammad is the messenger of God.”

About 4 p.m., three men ran from the cafe’s fire exit, one of them wearing a brown Lindt cafe apron. About an hour later, two women sprinted out the same side door, into the arms of police. Both also were wearing Lindt aprons and appeared to be employees.

Although many details about the siege remain unanswered, the choice of the location suggested that it was picked for maximum effect. The cafe is just yards from the newsroom of Channel Seven, the nation’s most-watched commercial broadcaster. Within minutes, a huge media contingent was camped across from the cafe.

One radio reporter said that he received a call from a “young person” held inside the cafe but that it would have been “irresponsible” to put the caller on the air in case the broadcast endangered others.

“I could hear the hostage-taker in the background issuing instructions to him on what to request me to say on air,” the reporter, Ray Hadley of Radio 2GB, told the Australian Broadcasting Corp.

Hadley only broadcast an impassioned plea: “If there are no children in there, please release the women.”

About 9 p.m., the lights in the cafe were switched off. Police officers put on night-vision goggles and reinforced the cordon around the building.

The raid came several hours later. By 2:45 a.m, police had declared the operation over.

Muslim leaders in Australia, including the grand mufti, Ibrahim Abu Mohamed, deplored the
hostage-taking as a “criminal act.”

While the hostage crisis was underway, downtown Sydney was placed on lockdown, evoking memories of a similar street-clearing order in late October after a lone gunman stormed the Canadian Parliament in Ottawa.

Helicopters hovered over the city. Surrounding streets and a train station were shut down. The opera house, the state library and the U.S. Consulate General were evacuated, and the opera house canceled Monday evening’s performances.

After the incident, world leaders were briefed on the situation. President Obama spoke with Lisa Monaco, his counterterrorism adviser.

One woman sent a text to her cousin — a single exclamation point — from the cafe moments after it was seized.

“I knew there was something wrong,” the relative told the Daily Mail Australia, declining to give her name at the time because of fears that it could put her cousin in danger.

Peter Holley contributed to this report.