It is the first time under current New Zealand law that a sentence of life without the possibility of parole has been imposed.
The attack last March, which was livestreamed, shocked the world.
"Your crimes are so wicked that even if you are detained until you die, it will not exhaust the requirements of punishment," said Judge Cameron Mander in a Christchurch court on Thursday.