The New Lynn mall terrorist asked to read books on martyrdom and the Islamic afterlife shortly before being freed from prison, according to security agency intelligence briefings.
A few months later, Ahamed Aathill Mohamed Samsudeen was shot dead by elite undercover police officers after he stabbed seven peoplein the aisles of a Countdown supermarket in September.
For seven weeks, the 32-year-old had been under 24/7 surveillance by members of the Special Tactics Group after being released from prison because he was considered a genuine terrorist threat.
The Sri Lankan had come to New Zealand in 2011 and later granted refugee status as a member of a persecuted minority, which was later revoked because of forged documents, before becoming radicalised through Islamic State propaganda on social media and coming to the attention of police in 2016.
Samsudeen had been in custody since May 2017 following his arrest at Auckland International Airport, as police and security services believed he planned to join the Isis conflict in Syria, and a second arrest in August 2018 after purchasing a hunting knife.
The subsequent prosecution of Samsudeen, who talked of committing a "Lone Wolf" knife attack, exposed a longstanding gap in New Zealand's counter-terrorism law after a High Court judge ruled that planning a terrorist attack was not an offence.
Instead Samsudeen was prosecuted on less serious charges and convicted of possession of objectionable material.
Having already spent so much time in custody, he was eventually sentenced in the High Court to one year of supervision and granted bail in July on active charges of assaulting two prison guards.
His anticipated release was closely monitored by the Security Intelligence Service, according to briefings obtained under the Official Information Act, which believed Samsudeen's time in prison had not moderated his extreme beliefs.
"Since his arrest in August 2018, Mohamed Samsudeen has displayed increasing anti-authoritarian and paranoid views, along with an increase in his propensity towards violence and personal isolation," according to an SIS briefing in June.
"Samsudeen shows behaviour consistent with paranoia and demonstrates a general mistrust in the New Zealand Government. It is a realistic possibility this continued behaviour will manifest as a mistrust of leaders and support figures in the community when he is released, which could escalate to verbal violence, threats and potential violence."
The SIS briefing noted Samsudeen referred to himself as a "terrorist" in prison and had been involved in a number of misconduct incidents.
"Samsudeen regularly questions, challenges and attempts to manipulate aspects of his management. It is likely he will continue to demonstrate this behaviour when released into the community."
He had also recently asked prison staff to provide a number of books on topics relating specifically to Islamic martyrdom, and what happens to an individual in the afterlife should they "die as a martyr".
Friends of Samsudeen have previously told the Herald on Sunday he had a weak theological grasp of his Muslim faith, saying they often corrected his extreme beliefs which conflicted with Islamic teaching.
His obsession with martyrdom and the afterlife with numerous posts on Facebook was what originally brought him to the attention of the SIS in 2016.
An intelligence briefing in February 2017 assessed Samsudeen as "highly likely" to want to travel overseas to join the militant jihad of Isis with the "specific goal of attaining martyrdom".
"Should Samsudeen believe he was unable to depart New Zealand to fulfil his intention to reach Syria and die as a martyr, it was a realistic possibility he would consider attaining martyrdom onshore by conducting an act of violence in New Zealand," according to the SIS.
A few months later, in May 2017, Samsudeen was arrested at the Auckland International Airport after booking a one-way ticket to Malaysia from where authorities suspected he would attempt to travel to Syria.
He was charged with possession of objectionable material and put into custody, later pleading guilty to the downgraded offences of possession of restricted material.
At this point there was some hope of de-radicalising Samsudeen, Australian criminologist Dr Clarke Jones has previously told the Herald on Sunday.
Jones gave expert evidence at one of the court hearings and said Samsudeen, whose understanding of Islamic faith was poor, would be an ideal candidate for a supervised intervention programme of teaching in the Muslim community.
Before this could start, Samsudeen was released on bail ahead of the High Court sentence hearing in August 2018 and was re-arrested after purchasing a knife.
He spent the best part of the next three years in prison until his release in July to a mosque in Glen Eden, West Auckland.
His time in prison "almost certainly" increased his paranoia and anti-authoritarian views, according to a SIS report a few weeks later, which meant Samsudeen posed a "heightened threat" to the public.
"There is a realistic possibility that Samsudeen could escalate to a sudden act of unanticipated and low sophistication violence if he perceives any insult or activity which might aggravate his existing and entrenched grievances," the July briefing said.
Following his release from prison, intelligence reports with a recent mugshot of Samsudeen were circulated to frontline police officers working in Auckland.
Staff were told he was a "National Security Person of Interest" who was not to be approached unless he was committing a crime, according to the briefing released under the Official Information Act.
Samsudeen was known to carry knives and may "spontaneously resort to violence" and officers were advised to use "extreme caution".
"Any emergency calls made regarding this person to be treated with the utmost urgency."
A final assessment by the SIS in August considered Samsudeen "continues to display similar and new indications that he is mobilising towards violence", although this was likely to be without warning.
A few weeks later, Samsudeen grabbed a knife from a shelf in the Countdown supermarket in New Lynn and stabbed seven shoppers. Undercover officers fatally shot him within 60 seconds and while several victims suffered life-threatening injuries they all survived.
The attack prompted the Government to propose urgent changes to terror and immigration laws, while a joint review into the actions of the New Zealand Police, Security Intelligence Service and Department of Corrections will determine whether anything more could have been done to stop him.
The independent inquiry is due to report back in March.