GUNFIRE and explosions were heard outside a Sydney city centre cafe, as a 17-hour siege entered its endgame.

Two people died, along with an Islamist gunman, after commandos stormed the Lindt Chocolat Cafe in Sydney, Australia.

One of the hostages killed during the siege has been named as Katrina Dawson, 38, the Australian Associated Press (AAP) has confirmed. She was a mother of three and worked as a barrister in the city.

AAP has also reported that the male hostage killed in the siege was Lindt Cafe manager, Tori Johnson, 34.

The gunman, identified as Iranian refugee Man Haron Monis, had taken dozens of hostages.

Four people were injured, including a policeman hit by shotgun pellets.

At least five hostages were seen running from the building, with their hands aloft.

Gunfire was heard shortly afterwards as armed police and medics entered the building.

Monis received political asylum in Australia in 1996 and was on bail facing a number of charges.

Prime Minister Tony Abbott said the "horrific incident" at the cafe had been "tragic beyond words" and there were "lessons to be learned" from this "brush with terrorism".

"These events do demonstrate that even a country as free, as open and as generous as ours is vulnerable to acts of politically motivated violence but they also demonstrate that... we are ready to respond," he told reporters.

Flags are to fly at half-mast across New South Wales to honour the victims.

The hostage recently attracted attention by writing offensive letters to the families of Australian soldiers killed in Afghanistan.

He was also banned in 2010 from writing similar "letters of condolence" to British soldiers killed in that conflict.

It is believed Monis, pictured, is out on bail after he was arrested earlier this year over sexual assault allegations stemming from 2002.

The Northern Echo:

One hostage could be seen being carried from the building by armed officers with blood on her bare feet.

Bomb disposal officers in protective gear were also seen entering the building and a bomb disposal robot was deployed.

It was not immediately clear what prompted the latest hostages to flee and the police to move in.

Earlier Chris Reason, a senior journalist at Seven News, which has its main Sydney newsroom across the plaza from the Lindt Chocolat Cafe, said he believed he could see the man inside carrying a pump-action shotgun.

Five people fled earlier in the hostage crisis, which began during morning rush hour.

The first three ran out of the cafe in Martin Place six hours into the crisis and two women sprinted from a fire exit into the arms of waiting police shortly afterwards. Both women were wearing aprons with the Lindt chocolate logo, indicating they were cafe employees.

Earlier, two people - apparently hostages - held up a flag at the cafe window with an Islamic declaration of faith on it.

A message apparently sent by Monis in October to members of the Muslim community and published on his personal website voiced support for non-violent activism.

"Islam is the religion of peace and a Muslim should be a peace activist," Monis wrote in a letter he signed "Sheikh Haron".

"Islam is against oppression and any unfair violence. Islam is against terrorism. As I have repeatedly said earlier: 'this pen is my gun and these words are my bullets, I fight by these weapons against oppression to promote peace'."

The website was this afternoon suspended.

Australian officials have not confirmed how many people were held inside the cafe, which was seized at the height of the Monday morning rush-hour.

Five people later made their way out, though police would not say whether they escaped or were released.