A knife attacker who killed six people and injured several others in a Sydney shopping centre has been shot dead by police.

Horrified shoppers looked on as the lone knifeman went on a stabbing spree on Saturday afternoon in the Westfield Bondi Junction centre.

A New South Wales Police officer confronted the attacker and shot him dead as he faced her and raised a knife.

Police have not identified the attacker but believe he acted alone.

They have not ruled out terrorism as a motive.

One of his victims is a small child, reported to be nine months old, who is being treated in hospital.

Australia Stabbing
Emergency services at Bondi Junction (Steven Saphore/AAP/AP)

Anthony Cooke, assistant commissioner of New South Wales Police, said: “A man walked into Westfield at Bondi Junction, he left the centre very shortly after and returned… as he moved through the centre he engaged with about nine people.

“It is clear that during that engagement he caused harm to those people, we believe by stabbing them with a weapon he was carrying.

“Very clearly a range of reports were made on the incident, police attended promptly – a single unit officer, inspector of police, was nearby, attended, (and) went into the centre directed by a range of people.

“She confronted the offender who had moved, by this stage, to level five.

“As she continued to walk quickly behind to catch up with him he turned to face her, raised a knife, she discharged a firearm and that person is now deceased.”

ABC News Australia spoke to a witness, who did not want to be identified, and reported that the person “saw a bloke in a green shirt start stabbing people indiscriminately”.

Another witness told the broadcaster about the moment the attacker was shot: “He just started floating towards us and all I heard was ‘put it down’ and then she shot him.

“But we were in no doubt, if she didn’t shoot him, he would have kept going. He was on the rampage.”

Footage has emerged of a man with a knife in shorts and a green and yellow shirt being confronted by another man on an escalator.

Mr Cooke said police said do not know of “any motive or any ideology” for the attacker but believes he “acted alone”.

Asked by reporters if he would rule out terrorism, Mr Cooke said: “We’re not ruling anything out.”