A report into last year's Christchurch mosque massacre said New Zealand security agencies were "almost exclusively" focused on the threat from Islamist terrorism, and police failed to enforce proper checks on firearm licenses.
The Royal Commission of Inquiry, however, said despite the shortcomings, there were no failings within government agencies that would have alerted them to the imminent attack by Brenton Tarrant, a white supremacist who killed 51 Muslim worshippers at two mosques in the South Island city on March 15, 2019.
"The commission made no findings that these issues would have stopped the attack. But these were both failings and for that I apologise," Prime Minister Jacinda Ardern said in a statement after the report was released.
Ardern received global praise for her compassionate response to the attack and for swiftly banning the sale of the high-capacity semi-automatic weapons used. She also launched a global movement against online extremism.
However, authorities were criticised for ignoring repeated warnings from the Muslim community that hate crimes against them were escalating.
The 800-page report said there was an inappropriate concentration of resources on the threat of Islamist extremist terrorism, as opposed to other threats including white supremacists. But this did not contribute to the attack not being detected, it added.
The government accepted all 44 recommendations made by the report, including establishing a new national intelligence and security agency, and appointing a minister to coordinate the government's response to the report.
The government said it would also act on a proposal for the police to better identify, record and respond to hate crimes.
Tarrant was sentenced to life in prison without parole in August for the attack, which left dozens injured.
In its response to the report, the government said it would tighten firearm licensing laws, strengthen counter-terrorism laws, act on laws related to hate-motivated activity and inciting hatred against an individual or a group.
It would also create an ethnic community ministry and a graduate programme for ethnic communities to support the country's diverse population.
The report revealed Tarrant was treated by doctors in Dunedin city in the months leading up to the attack after accidentally shooting himself, but staff never alerted police to his injuries.
The report recommended introducing mandatory reporting of firearm injuries to New Zealand police by health professionals.
"Ultimately, this roughly 800 page report can be distilled into one simple premise. Muslim New Zealanders should be safe. Anyone who calls New Zealand home, regardless of race, religion, sex or sexual orientation should be safe," Ardern said.
Disclaimer: The headline of this news has been modified