The white supremacist who slaughtered 51 people in a shooting rampage at two New Zealand mosques last year unexpectedly pleaded guilty to all charges on Thursday, meaning there will be no trial in his case.

Brenton Tarrant, 29, showed no emotion as he appeared via video link from an Auckland prison cell, where he pleaded guilty to 51 counts of murder, 40 counts of attempted murder and one count of terrorism.

He had previously pleaded not guilty and his trial was due to start in June. No reason was given for his decision to plead guilty and his lawyers could not be reached for comment. He faces life in prison but a judge could decide to allow him to apply for parole at an earlier date in light of his guilty plea.

His decision was met with mixed emotions but mainly relief by New Zealand’s Muslim community, which just two weeks ago marked the one-year anniversary of the March 15, 2019 attacks in the city of Christchurch.

"I feel conflicted,” said Aya al-Umari, whose brother Hussein was killed in the attack on the al-Noor mosque.

She said that she had wanted to find out more details about what happened during the massacre at the trial but she was also relieved about not having to face the trauma of sitting through it.