Samsudeen arrived in New Zealand in October 201.
"He was 22 years old and travelling on a student visa," Ardern said.
"Shortly after arriving he made a claim for refugee status. Immigration New Zealand declined this claim in 2012, but he appealed to the Immigration and Protection Tribunal and was successful. He was granted refugee status in December 2013.
"In 2016, the terrorist came to the attention of the police and the NZSIS."
Arden said during the course of investigations, Immigration New Zealand "were made aware of information that led them to believe the individual's refugee status was fraudulently obtained".
"The process was started to cancel his refugee status, and with it, his right to stay in New Zealand.
"In February of 2019, Immigration New Zealand cancelled his refugee status. He was served with deportation liability notices. In April, he appealed against his deportation to the Immigration and Protection Tribunal. He was still in prison at this time, and facing criminal charges. For a number of reasons, the deportation appeal could not proceed until after the conclusion of the criminal trial in May 2021."
Ardern said agencies also became 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.
"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.
"A person can only be detained under the Immigration Act for the purpose of deportation. Immigration New Zealand was required to consider whether deportation was likely to proceed. That meant making an assessment of what the tribunal would likely find. Crown Law's advice to Immigration New Zealand was that the individual was likely to be considered a 'protected person' because of the status of the country from which he had travelled, and likely treatment on return. Protected people cannot be deported from New Zealand. After receiving this advice Immigration New Zealand determined they could not detain the individual while he waited for his appeal."
Soon after he was released from prison and the police monitoring and surveillance of Samsudeen begun.
"On [August 26] the Immigration and Protection Tribunal hearing was rescheduled. At the time of the terrorist attack, the offenders attempt to overturn the deportation decision was still ongoing," Ardern said.
"This has been a frustrating process."
Ardern also said she had met with officials and "expressed my concern that the law could allow someone to remain here who obtained their immigration status fraudulently and posed a threat to our national security".
Collins calls for law change
National Party leader Judith Collins wants the Government to be able to strip citizenship or residency from those who have moved to New Zealand but then commit a violent act.
Yesterday, she also defended her decision in 2013 when, as Justice Minister, she removed a review of counter-terrorism laws from the Law Commission's work programme saying "there does not appear to be any substantial or urgent concerns arising from the operation of the [Terrorism Suppression] Act".
The gap in the law has existed across successive governments and has come under scrutiny in the wake of the terror attack in Auckland yesterday, when a terrorist attacked six people in a supermarket before being shot by police who were surveiling him.
Collins told RNZ yesterday she had texted Prime Minister Jacinda Ardern on Friday night offering National's support to pass the bill into law under urgency.
Asked about her comments in 2013 about having no substantial or urgent concerns with New Zealand's counter terrorism legislation, she said it was "really unfair" to ask her about decisions from eight years ago.
"You are asking me to reach back without notes to go back and look at eight years ago at decisions made by the Cabinet," Collins told RNZ.
She said she wasn't going to second-guess Cabinet decisions - which would have been made in a particular context, and following consultation - from eight years ago.
The horrific events on Friday showed a need for an ability for a government to remove citizenship or residency from someone who had been granted it and later committed a violent crime, she said.
"It is a privilege, not a right. I am offering National's support to work constructively with the Government to make this change.
She said the Immigration Minister should be able to revoke a residency visa if the holder of the visa does something that would fail the "good character" threshold.
That would include being sentenced to a term of imprisonment of 12 months or more.
Under the Immigration Act, residency or permanent residency visas are cancelled if the holder is deported.
Reasons for deportation include committing an offence that could lead to a jail term of at least three months within the first two years of residence, or one that could lead to a jail term of at least two years within the first five years of residence.
Currently the Minister of Internal Affairs can remove someone's citizenship if they have taken on the citizenship or nationality of another country and "acted in a matter contrary to the interests of New Zealand", or had acted fraudulently to gain citizenship in the first place.