New Zealand police on Friday shot and killed a violent extremist after he stabbed and injured six shoppers, reports Associated Press.

Describing the incident as a terror attack, Prime Minister Jacinda Ardern said the man was a Sri Lankan national and he was inspired by the Islamic State group. The PM added that the man a known security threat and was being monitored around the clock.

Police arrest two anti-lockdown leaders across Australia, New Zealand

She said that by law, the man was not allowed to be kept in prison.

Ardern said that three of those who had been stabbed were seriously injured.

“This was a violent attack. It was senseless,” Ardern said. “And I am so sorry that it happened.”

The incident took place at 2:40 p.m. at a Countdown supermarket in Auckland.

A special tactics group killed him within 60 seconds of the attack starting.

Police Commissioner Andrew Coster said they had concerns about the man’s ideology and kept very close tabs on him. Coster said they followed him from his home to the supermarket on Friday.

“He entered the store, as he had done before. He obtained a knife from within the store,” Coster said. “Surveillance teams were as close as they possibly could be to monitor his activity.”

Coster said that when the commotion started, two police from the special tactics group rushed over. He said the man approached police with the knife and so they shot and killed him.

One bystander video taken from inside the supermarket records the sound of 10 shots being fired in rapid succession.

Ardern said legal constraints prevented her from discussing everything that she wanted to about the case, but she was hoping to have those constraints lifted soon.

Some shoppers in the supermarket reportedly tried to help those who had been wounded with towels and diapers.

“To everyone who was there and who witnessed such a horrific event, I can’t imagine how they will be feeling in the aftermath,” Ardern said. “But thank you for coming to the aid of those who needed you when they needed you.”

Auckland is currently in a strict lockdown as it battles an outbreak of the coronavirus. Most businesses are shut and people are generally allowed to leave their homes only to buy groceries, for medical needs or to exercise.

(With inputs from Associated Press)