Sydney: Five people ran out of a Sydney cafe where a gunman has taken hostages and displayed an Islamic flag against the window, witnesses and police said on Monday, adding that no one has yet been harmed.

Three hostages, all men, emerged from the Lindt chocolate cafe almost six hours after the standoff began with two women fleeing around an hour later, watched by heavily-armed police.

It was not clear if they escaped or were released.

"Three people have now emerged from the location in Martin Place," New South Wales police deputy commissioner Catherine Burn said, referring to the central business district location.

"The first thing we will do is make sure they are okay.

"We will work with these people to figure out more information. We do not have information to suggest that anyone is harmed at this stage."

Two other women hostages ran out some time later, a news agency's reporter at the scene witnessed.

Police said they did not have precise figures on how many hostages remained in the building but Burn said "it is not as high as 30" as some reports had suggested.

She added that police negotiators "have had contact and continue to have contact" with the person holding the hostages, but they still did not know the motivation for the siege.