New Zealand’s bishops have expressed their solidarity with the country’s Muslim community after mass shootings at two mosques killed nearly 50 people on Friday morning.

Prime Minister Jacinda Ardern said the events in Christchurch represented “an extraordinary and unprecedented act of violence” and called it “one of New Zealand’s darkest days.”

Police have arrested four people in relation to the terrorist attack and defused several devices.

The deadliest attack occurred at the Masjid Al Noor mosque in central Christchurch. Arden said 30 people were killed there. There was a second shooting at the Linwood Masjid Mosque that Ardern said killed 10 people. Police later said the death toll had risen to 49.

In a statement, the heads of New Zealand’s six Catholic dioceses said they wished the Muslim community to “be aware of our solidarity with you in the face of such violence.”

“We are profoundly aware of the positive relationships we have with Islamic people in this land, and we are particularly horrified that this has happened at a place and time of prayer. We are deeply saddened that people have been killed and injured, and our hearts go out to them, their families and wider community. We wish you to be aware of our solidarity with you in the face of such violence,” the bishops said.

An ecumenical statement from church leaders in Christchurch and Canterbury said they were “absolutely devastated at the unprecedented situation in Christchurch this afternoon and our hearts and prayers go to all involved.”

“No religious organization or group deserves to be the target of someone’s hate – regardless of beliefs,” the statement said.

“So across the churches of Christchurch and Canterbury, we are praying for our Muslim brothers and sisters, for those injured and those who have lost loved ones, for the police, ambulance and other emergency services, and for all in the city of Christchurch who are feeling distress and fear due to this event. We are upholding you all in our prayers. We pray too for the shooter and their supporters, because for any person to do this, they must have such hatred in their hearts, such misalignment of the value of human life, that they too, need our prayer,” the church leaders said.

In a separate statement, Bishop Paul Martin of Christchurch said he was “horrified” by the violence.

“Words cannot convey our distress. Our prayers are with those who are suffering,” Martin said. It was later announced the bishop would celebrate Mass for the victims of the tragedy on Saturday morning.

Muslims make up only 2.6 percent of New Zealand’s 5 million people. Most of them are immigrants, with a large percentage being refugees.

Ardern at a news conference alluded to anti-immigrant sentiment as the possible motive, saying that while many people affected by the shootings may be migrants or refugees “they have chosen to make New Zealand their home, and it is their home. They are us. The person who has perpetuated this violence against us is not.”

A man who claimed responsibility for the shootings left a 74-page anti-immigrant manifesto in which he explained who he was and his reasoning for his actions. He said he was a 28-year-old white Australian.

He said he came to New Zealand only to plan and train for the attack. He said he chose New Zealand because of its location, to show that even the most remote parts of the world were not free of “mass immigration.”

He said he was not a member of any organization, but had donated to and interacted with many nationalist groups, though he acted alone and no group ordered the attack.

He said the mosques in Christchurch and Linwood would be the targets, as would a third mosque in the town of Ashburton if he could make it there.

Australian Prime Minister Scott Morrison confirmed that one of the four people arrested was an Australian-born citizen.

In a statement, the president of the Australian Catholic Bishops’ Conference sent his condolences to the bishop of Christchurch for “this unfathomable act of evil.”

“To the condolences therefore I join our prayers that out of evil good will come, strengthening the bonds of good will in the city, the country and the entire human family, but especially between Christians and Muslims,” said Brisbane Archbishop Mark Coleridge.

A cricket match between New Zealand and Bangladesh scheduled to start Saturday was canceled after the Bangladesh cricket team had a narrow escape.

Players and members of the team’s coaching staff were reportedly on their bus, approaching the Masjid Al Noor mosque in Hagley Park when the shooting broke out.

Mass shootings in New Zealand are exceedingly rare. The deadliest in modern history occurred in the small town of Aramoana in 1990, when gunman David Gray shot and killed 13 people following a dispute with a neighbor.

This report incorporated material from the Associated Press.