WELLINGTON (REUTERS) - New Zealand security agencies were "almost exclusively" focused on the threat from Islamist terrorism before a white supremacist gunman killed 51 Muslim worshippers in Christchurch last year, a report into the country's worst massacre found.
The Royal Commission of Inquiry also criticised police for failing to enforce proper checks when granting a firearms license to Australian gunman Brenton Tarrant, who released a racist manifesto shortly before the attack and streamed the shootings live on Facebook.
But despite the shortcomings, there were no failings within government agencies that would have prevented the attack 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.
Tarrant was sentenced to life in prison without parole in August for the attack, which left dozens injured.
Ms 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.
Submissions to the commission by various Muslim organisations described how they felt they were targeted by security agencies while threats against them were not taken seriously.
"We find it concerning that the Commissioners found systemic failures and an inappropriate concentration of resources towards Islamic terrorism, and yet state that these would not have made a difference to the terrorist being detected prior to the event," the Islamic Women's Council said in a statement.
Mr Gamal Fouda, the Imam of Al Noor mosque which was targeted by the shooter, said the report showed "institutional prejudice and unconscious bias" exists in government agencies.
The government accepted all 44 recommendations made by the report including to establishing a new national intelligence and security agency, and appointing a minister to coordinate the government's response to the report.
It said it would create an ethnic community ministry and a graduate programme for ethnic communities to support the country's diverse population.
The government would also tighten firearm licensing laws, strengthen counter-terrorism laws, and make changes so police can better record and respond to hate crime.
The report found that despite having no history in New Zealand, Tarrant's application for a firearms license was approved by the police.
It recommended mandatory reporting of firearm injuries by health professionals, after it was revealed Tarrant was treated by doctors in the months leading up to the attack after accidentally shooting himself.
The report described Tarrant as "socially isolated" with few childhood friends but an avid Internet user and online gamer.
Before arriving in New Zealand in August 2017, he travelled extensively, visiting dozens of countries between 2014 and 2017, mostly alone.
"The individual could present well and conducted himself in a way that did not attract suspicion. He was not identified as someone who posed a threat," said the report.
Other than an email Tarrant sent eight minutes before he opened fire, there was no other information available that could have alerted authorities to the attack, it said.
Tarrant trained for the attack in New Zealand by developing expertise with guns at a rifle club, working out at a gym and taking steroids to bulk up, the report said.
He frequented extreme right-wing discussion boards such as those on 4chan and 8chan but YouTube was a far more significant source of information and inspiration.
Ms Ardern said she planned to raise this directly with the leadership of YouTube.