The Australian gunman who killed dozens of people during attacks on two mosques in New Zealand has been sentenced to life in prison without the possibility of parole.

Brenton Harrison Tarrant had pleaded guilty during court proceedings in Christchurch to murder, attempted murder and terrorism over the attacks in the city which left 51 people dead.

In imposing the sentence for the first time in the country’s history, Judge Cameron Mander said that the white supremacist’s crimes were so wicked that a life time in jail could not begin to atone for them.

He said they had caused enormous loss and hurt, and stemmed from a warped and malignant ideology.

Mr Mander said: “Your actions were inhuman. You deliberately killed a 3-year-old infant as he clung to the leg of his father.”

The judge at the high court in Christchurch noted Tarrant had recently told assessors that he now rejects his extremist philosophy and considers his attacks “abhorrent and irrational”.

But Mr Mander said the sincerity of that change of heart was questionable and Tarrant had still shown no empathy toward his victims or sorrow for what he had done.

During the four-day sentencing hearing, 90 survivors and family members recounted the horror of the attacks and the trauma they continue to feel.

Some chose to yell at the gunman and give him the finger. Others called him a monster, a coward and a rat. Some sung verses from the Quran or addressed him in Arabic, while a few spoke softly and said they forgave him.

Tarrant had earlier fired his lawyers and told the judge that he did not wish to speak at the hearing. A standby lawyer appointed by the court told the judge that Tarrant did not oppose a sentence of life without parole.

Gunman confronted by victim's father
John Milne holds a photograph of his son, Sayyad Milne, who was killed in the massacre (AP)

Many of the victims and family members who spoke at the hearing asked the judge to impose the maximum possible penalty – life without the possibility of parole.

Dressed in a gray prison tracksuit, Tarrant showed little emotion during his sentencing. He watched the speakers, occasionally giving a small nod or covering his mouth as he laughed at jokes, often made at his expense.

Sara Qasem spoke Thursday during the four-day hearing about her beloved father Abdelfattah, who was killed in the attacks.

She said: “All a daughter ever wants is her dad. I want to go on more road trips with him. I want to smell his garden-sourced cooking. His cologne.

“I want to hear him tell me more about the olive trees in Palestine. I want to hear his voice. My dad’s voice. My baba’s voice.”

The attacks targeting people praying at the Al Noor and Linwood mosques shocked New Zealand and prompted new laws banning the deadliest types of semi-automatic weapons.

They also prompted global changes to social media protocols after the gunman livestreamed his attack on Facebook, where it was viewed by hundreds of thousands of people.