Court documents identify Auckland attacker as a Tamil Muslim from Sri Lanka who was granted refugee status in 2013.
The statement came late on Saturday after a court in New Zealand lifted suppression orders and allowed the publication of details on the attacker.
The 32-year-old had arrived in New Zealand 10 years ago on a student visa seeking refugee status, which was granted in 2013.
Ardern, who referred to Samsudeen as “the terrorist” and did not mention his name, said he came to the attention of the police and security services in 2016 after expressing sympathy on Facebook for “terrorist” attacks.
Subsequent investigations revealed that his refugee status was fraudulently obtained and authorities began the process to cancel his right to stay in New Zealand.
Court documents said Samsudeen was arrested at Auckland airport the following year, when it was suspected he was on his way to Syria. A police search of his home at the time revealed a large hunting knife and “propaganda” material related to the ISIL (ISIS) group.
He was in prison facing criminal charges, including over the ISIL material, when the New Zealand government served him with deportation notices in 2019.
But Samsudeen appealed the notice, telling a court he faced “arrest, detention, mistreatment and torture” if sent back to Sri Lanka.
In her statement, Ardern said the deportation appeal could not proceed until after Samsudeen’s criminal trial concluded.
“In the meantime, agencies were concerned about the risk this individual posed to the community,” she added, noting officials knew he could be released and that the appeal, “which was stopping his deportation, may take some time”.
At that stage, Samsudeen had been held in custody for three years and authorities had exhausted all avenues to keep him detained.
He was released on bail in July, but subject to constant surveillance.
While the legal process dragged on, Samsudeen grabbed a knife off a supermarket shelf in Auckland on Friday and injured seven people, leaving three critically wounded, before he was shot dead by police who were tailing him.
Ardern promised on Saturday to pass legislation that would criminalise planning a terror attack and tighten other counterterrorism laws.
The new bill will criminalise planning and preparation that might lead to an attack, closing what critics have said has been a loophole allowing plotters to stay free.
Samsudeen’s family issued a statement to the local media on Saturday, describing their shock over the attack.
“We are heartbroken after this terrible event,” said the statement released by his brother Aroos, carried by state broadcaster 1NEWS.
“We hope to find out with you all, what happened in Aathil’s case and what we all could have done to prevent this,” the statement said.
Sri Lanka’s Muslim Council has also condemned the Auckland attack as a “barbaric act of terrorism”.
“This reminds all of us to come together and be united and fight against terrorism and violent extremism,” council member Mohamed Hisham told the AFP news agency.