That a known Islamist extremist was free to launch a knife attack in New Zealand underlines the limitations of the law even in cases where someone is of such concern they are under constant surveillance.
At least the fact the suspect was monitored 24/7 meant his ability to cause carnage was stopped within a minute as armed police shot him dead.
But the stabbing of six people at a supermarket in Auckland is bound to raise uncomfortable questions for authorities over their ability to keep people known to pose a threat off the street.
The security services had been so worried about the knife-man, originally from Sri Lanka, that Prime Minister Jacinda Ardern had previously been briefed about him.
Yet, they appeared unable to find a legal reason for him to be detained in the days leading up to the attack.
“Had he done something that would have allowed us to put him into prison, he would have been in prison,” Ms Ardern said.
The man, who moved to New Zealand 10 years ago from Sri Lanka, came to the attention of the authorities in 2016.
He was known to be a supporter of the terrorist group Islamic State and is believed to have acted alone.
Dealing with the threat posed by lone actors is particularly difficult for the police and security services because they are not part of a wider network that can be tracked and monitored.
But in the case of this attacker, he was already under the most robust kind of monitoring available short of detention and yet was still able to access a knife and inflict harm.