New Zealand suffered the worst terrorist attack in its history on Friday when 49 people were killed in two shootings at mosques in Christchurch during Friday prayers. Three people are in custody and one—a man in his late 20s who has not been named—has already been charged with murder.

One of the attacks, on the Al Noor Mosque in central Christchurch, was livestreamed on Facebook by the alleged shooter, Brenton Tarrant, who identified himself as a 28-year-old Australian. The BBC reports that “the footage showed him firing indiscriminately at men, women and children from close range.” The suspect appears to have published an online manifesto before the attack in which he espoused far-right, anti-immigrant, and anti-Muslim beliefs.

Prime Minister Jacinda Ardern described the attacks as “one of New Zealand’s darkest days” and an “unprecedented” act of violence, which is no exaggeration. Terrorist attacks have been exceedingly rare and minor in the country in recent decades. New Zealand was ranked the world’s second-most-peaceful country after Iceland in 2018 by the Institute for Economics & Peace. It has one of the world’s lowest murder rates and extremely strict gun laws. Deputy Prime Minister Winston Peters said there would be a review of those laws to determine how the perpetrators obtained automatic weapons.

New Zealand has had one of the fastest-growing immigrant populations among developed countries in recent years, much of it from Asia. This has led to at least some political backlash, with Peters’ New Zealand First party calling for immigration restrictions and being accused of fomenting racism. Police clashed with right-wing nationalists who rallied outside the Parliament in Wellington in 2017.* According to New Zealand’s most recent census, 1.1 percent of the population is Muslim.

The main suspect announced his attack on the online message board 8Chan, known for hosting white supremacist content and conspiracy theories. The “manifesto” appears to be a mix of genuine far-right ideology with a fair bit of trolling and irony. It cited previous right-wing terrorists including Norway’s Anders Breivik and Charleston, South Carolina, shooter Dylann Roof as inspirations.*