Emergency services were called to Westfield Bondi Junction in Sydney's eastern suburbs about 3.40pm on Saturday on reports of an attack which sent hundreds of people fleeing the centre.
NSW Police confirmed on Saturday evening that five people had died of stab wounds and a baby was among those seriously injured.
Dozens of paramedics treated patients at the scene, and police declared a critical incident.
Multiple posts on social media showed crowds of people outside the shopping centre.
Police said the attacker acted alone and there was no longer a threat.
There were multiple reports of people running from a man wielding a knife and hiding at the back of shops.
NSW Ambulance said seven people had been taken to hospital with stab wounds, including a nine-month-old baby.
One witness told ABC News he heard yelling and screaming then saw people running and he followed a female police officer upstairs.
They then confronted a man coming towards them with a knife and the officer told him to put it down.
When the man did not comply the officer shot him and then gave him CPR.
"He would have kept going, he was on a rampage ...he had a nice big blade on him so she chucked the knife away ... it looked like he was on a killing spree," the witness said.
A woman told the ABC she thought she was going to die.
"I just came out of the gym and I was and I was just like living my life and then I thought I was going to die ... I was just so scared," she said.
Other witnesses told of grabbing their children and running from the centre along with hundreds of other people.
Waverley Council said on social media the shopping centre was in lockdown and advised against unnecessary travel to Bondi Junction.
Roi Huberman told the ABC he sheltered in a store as the incident unfolded and later saw people leaving the centre in tears.
"I think people are worried about what the nature of it was," he said.
Prime Minister Anthony Albanese said on X he had been briefed by Australian Federal Police on the "devastating events" at Bondi Junction.
"Tragically, multiple casualties have been reported and the first thoughts of all Australians are with those affected and their loved ones."
NSW Premier Chris Minns, also on X, said he was horrified to hear of the attack and was making immediate arrangements to return to Sydney.
"I want to thank NSW Police, emergency services and first responders and the community for their bravery in the face of this shocking incident."