SYDNEY - An attacker who fatally knifed five people in a Sydney mall was shot dead by police in Sydney's beachside suburb of Bondi on Saturday, police said, as hundreds fled the scene.

The assailant was shot by a police officer after he engaged with nine people in the busy Westfield Bondi Junction shopping centre, police said.

"She discharged a firearm and that person is now deceased. I am advised that there are five victims who are now deceased as a result of the actions of this offender," New South Wales Police Assistant Commissioner Anthony Cooke told a press conference.

Police have no indication of the man's motive, Cooke said.

Emergency services were called to the mall just before 4 p.m. (0600 GMT) after the stabbing reports, police said.

Eight people, including a child, had been taken to hospital, said a New South Wales Ambulance spokesperson.

Hundreds of people were evacuated from the shopping centre after the incident, news site news.com.au reported.

Two witnesses told Reuters they heard shots fired.

“Even 20 minutes after people were rushed out of the mall, I saw SWAT teams of people sweeping the surrounding streets,” one witness said.

The other said they saw a woman lying on the ground and took shelter in a jewellery store.

An eyewitness described the police officer shooting the attacker to state broadcaster ABC.

"If she did not shoot him, he would have kept going, he was on the rampage," said the man, who did not give his name. "She went over and was giving him CPR. He had a nice big blade on him. He looked like he was on a killing spree."

Several posts on social media showed crowds fleeing the mall and police cars and emergency services rushing to the area.

"Our hearts go out to those injured and we offer our thanks to those caring for them as well as our brave police and first responders," Australian Prime Minister Antony Albanese posted on social media site X.

(Reporting by Kirsty Needham, Sam McKeith and Lewis Jackson in Sydney; Writing by Alasdair Pal; Editing by Stephen Coates and William Mallard)