New Zealand Prime Minister Jacinda Ardern said police shot dead a "violent extremist" who was known to authorities on Friday, after he stabbed and wounded at least six people in a supermarket.

She added that the attacker is a citizen of Sri Lanka and has lived in New Zealand for 10 years, who was inspired by the ideas of the Islamic State and was under constant surveillance.

"A violent extremist carried out a terrorist attack on innocent citizens," she said in a statement, adding, "He was apparently a supporter of the ideology of the Islamic State."

She said the attacker, whom she identified, had been a "person to watch" for about five years, and said he was killed within 60 seconds of the attack in Auckland.

single attack

"What happened today is indescribable, it was an act of hate," she added, adding that the attack did not represent any religion, any cultural or ethnic group, and that the attacker "only bears responsibility for these acts."

One of the shoppers, Michael Miller, told a news website that the police watching the man thought he had gone to the store in New Lane to shop, but he picked up a knife from a display rack and started "running around like crazy", stabbing people.

Police Commissioner Andrew Koster said in a briefing that the man was acting alone, adding that police were confident there were no further threats to people's lives.

The Saint John Ambulance Service said one of the six injured was in serious condition, three in critical condition and two in moderate condition.

New Zealand has been on high alert since a white supremacist gunman killed 51 people in two mosques in Christchurch on March 15, 2019.

Asked if Friday's attack was some kind of retaliation for the attacks on the two mosques in 2019, Ardern said it was not clear.