The man responsible for Friday afternoon's terror attack in a west Auckland supermarket can now be named as Ahamed Aathill Mohamed Samsudeen.
The 32-year-old Sri Lankan national was shot dead by police after stabbing six people inside Countdown LynnMall. A seventh person was also injured in the attack.
Suppression orders have prevented details about his identity and background from being made public.
They have now lapsed and it can be revealed immigration authorities were seeking to have Samsudeen's refugee status revoked.
Prime Minister Jacinda Ardern has also released a statement tonight saying the government has been trying to deport Samsudeen for years in a process she described as "frustrating".
He arrived in New Zealand in October 2011 on a student visa and was granted refugee status in December 2013.
But almost five years later, Samsudeen was told plans were underway to cancel it - which he appealed.
In the intervening years, Samsudeen had come to the attention of the police for his extremist, violent, pro-Islamic State views.
He got a formal warning in 2016 for posting extremist content online and in 2017 he was arrested at Auckland Airport, when it was suspected he was on his way to Syria.
When police searched his apartment, they found a large hunting knife under the mattress on the floor and secure digital cards containing fundamentalist material, including propaganda videos and photos of the man posing with a firearm.
He ended up pleading guilty to distributing restricted publications and was sentenced on that offending in September 2018 to supervision.
But in August 2018, while he was on bail awaiting sentencing, he was arrested again after he bought another hunting knife.
A second search also found a large amount of violent Isis material.
In May this year, a jury found him guilty of two charges of possessing Isis propaganda that promoted terrorism and one charge of failing to comply with a search.
He was acquitted of a third charge of possessing objectionable material and a charge of possessing a knife in a public place.
After spending three years remanded in custody, Samsudeen was sentenced in July to 12 months' supervision.
The suppression orders
Samsudeen was granted name suppression by Justice Wylie in the High Court in July 2018.
At that stage, his refugee status was uncertain and the suppression order was to remain in place until that was determined.
Justice Wylie said at the time the order was made, there was a risk that if he was deported to Sri Lanka, his safety would be in danger.
As it stands, Samsudeen's appeal of the notice of intention to cancel his refugee status has not been completed.
But on Friday night, the Crown filed an urgent application in the High Court to have the suppression orders lifted.
In a decision late on Friday night, Samsudeen's name suppression was revoked.
But Justice Wylie gave his lawyers a further 24 hours to contact his family about whether they wanted to seek fresh suppression orders.
Following a second hearing on Saturday afternoon, Justice Wylie ruled that details about Samsudeen's immigration status and the reasons for his claim to refugee status can be made public.
Usually, by law, the fact someone is claiming refugee status - and the reasons for that - must be kept confidential if it would identify them or endanger their safety.
Justice Wylie concluded those obligations no longer apply.
'Disappointing and frustrating' process - Ardern
In a statement, Prime Minister Jacinda Ardern said the lifting of suppression orders showed the government had been trying for years to deport Samsudeen.
After Samsudeen came to the attention of the police and Security Intelligence Service in 2016, Immigration New Zealand was made aware of information that led them to believe the individual's refugee status was fraudulently obtained, Ardern said.
"The process was started to cancel his refugee status, and with it, his right to stay in New Zealand," she said.
Samsudeen's deportation appeal could not be heard until the conclusion of the most recent proceedings against him in the High Court.
"In the meantime, agencies were concerned about the risk this individual posed to the community. They also knew he may be released from prison, and that his appeal through the Tribunal, which was stopping his deportation, may take some time," Ardern said.
"Immigration New Zealand explored whether the Immigration Act might allow them to detain the individual while his deportation appeal was heard.
"It was incredibly disappointing and frustrating when legal advice came back to say this wasn't an option."
Ardern said it had been a "frustrating process", as ministers had been seeking advice since 2018 on the government's ability to deport Samsudeen.