WELLINGTON, New Zealand — At least 49 people were killed at two mosques in Christchurch, New Zealand, on Friday, in a horrific and methodical afternoon slaughter, part of which was broadcast live on the internet after the publication of a white supremacist manifesto online.

The massacre, which Jacinda Ardern, New Zealand’s prime minister, condemned as a terrorist attack and called “an extraordinary and unprecedented act of violence,” interrupted a day of prayer for a small immigrant community in the nation’s third-largest city and shook a country with little history of mass shooting.

Harrowing first-person footage, apparently from a camera worn by a gunman as he attacked the Al Noor Mosque in the center of the city, was streamed on Facebook — a grim milestone in the evolution of terrorism that raised questions about how tech companies can block extremists from using social media to spread hate and inspire violence.

[Follow our live briefing here.]

Facebook said it quickly shut down the account, but a 17-minute video showing a man dressed in black shooting at fleeing worshipers and into piles of bodies with a semiautomatic rifle circulated widely online. In addition to those killed, at least 48 people were being treated for gunshot wounds, including young children, the authorities said.

The police said a man in his late 20s was arrested and charged with murder but declined to identify him. The police also said they seized several weapons and found two explosive devices on a vehicle.