An Australian white supremacist charged with killing 51 worshipers at two mosques in New Zealand last year changed his plea to guilty on Thursday, a move that surprised survivors and relatives of the victims who had hoped to see swift justice for the deadliest act of violence in the country’s history.

After initially denying that he had played a role, Brenton Tarrant, 29, pleaded guilty to 51 counts of murder, 40 counts of attempted murder and one count of terrorism for a killing spree in the city of Christchurch on March 15 of last year.

The mass shooting led to the adoption of new domestic laws banning semiautomatic weapons and ignited a global effort to restrict racist and violent content on the internet. The killer had posted a hate-filled manifesto online and live-streamed the shootings on Facebook for several minutes.

New Zealand’s prime minister, Jacinda Ardern, said in a statement that the guilty plea would “provide some relief to the many people whose lives were shattered by what happened on March 15.”