Forty-nine people were killed and 48 injured in attacks at two Christchurch mosques on Friday in the worst mass shooting in New Zealand's history.

Prime minister Jacinda Ardern described the atrocity as a terrorist attack and one of New Zealand's "darkest days".

A gunman, identifying himself as an 28-year-old Australian Brenton Tarrant, live-streamed footage online as he drove to Al Noor Mosque and opened fire on the people inside.

In the footage, filmed using a headmounted camera and widely circulated on social media, the man divulged his racist and anti-immigrant views before shooting worshippers at random.

The 17-minute clip was live-streamed from a Facebook account under Tarrant's name and he appears to have shared Twitter posts showing a heavily modified AR-15 style assault rifle.

At least 49 killed in New Zealand terror attack Show all 17 1 /17 At least 49 killed in New Zealand terror attack At least 49 killed in New Zealand terror attack Paramedics assist a man wounded in the shootings EPA At least 49 killed in New Zealand terror attack Bloodied bandages lie on the road following the shootings EPA At least 49 killed in New Zealand terror attack Police officers console a man at the scene of the shootings AP At least 49 killed in New Zealand terror attack New Zealand Prime Minister Jacinda Ardern speaks at a press conference following the shootings Getty At least 49 killed in New Zealand terror attack Masjid Al Noor mosque on Deans Avenue in Christchurch, the scene of the first shooting EPA At least 49 killed in New Zealand terror attack A tribute left near the Linwood Masjid mosque. The letter reads: thinking of everyone on this most tragic of days. We are neighbours & community here in Linwood & our hearts are with you Getty At least 49 killed in New Zealand terror attack Armed police stand at the scene of the attack AFP/Getty At least 49 killed in New Zealand terror attack A forensic official works at the scene AFP/Getty At least 49 killed in New Zealand terror attack A car damaged in the shooting AFP/Getty At least 49 killed in New Zealand terror attack Armed police stand at the scene of the attack Getty At least 49 killed in New Zealand terror attack A survivor stands outside Christchurch hospital Getty At least 49 killed in New Zealand terror attack Emergency responders help a wounded man at the scene of the shooting at a mosque in Christchurch AP At least 49 killed in New Zealand terror attack People wait near the scene of the shootings AP At least 49 killed in New Zealand terror attack Paramedics help a wounded man at the scene of the shooting at a mosque in Christchurch AP At least 49 killed in New Zealand terror attack Members of the Armed Offenders Squad push back members of the public at the scene EPA At least 49 killed in New Zealand terror attack Ambulances at the scene of the shootings AP At least 49 killed in New Zealand terror attack New Zealand Prime Minister Jacinda Ardern speaks at a press conference following the shootings Getty

A man in his late 20s has been arrested and charged with murder, police have said, adding that he is due to appear in court on Saturday. He also appears to have published a 'manifesto' before the atrocity, outlining his intentions and plans for the attack.

Two other men and a woman were also detained, one of whom has since been released, and authorities say they are still trying to determine what roles the suspects that are still in custody may have played in the attack. None of the suspects have been identified by police.

Police Commissioner Mike Bush told reporters that none of the people arrested were on watchlists and authorities will take measures to ensure no chances were missed to stop the attack, which he described as a "very well-planned event".

"Part of our investigation ought to be to look back to ensure that law enforcement didn't miss any opportunities to prevent this horrendous event," he said.

Police also defused "a number of IEDs attached to vehicles", he added.

Mosques across the country were advised to shut down until further notice and residents in Christchurch were urged to stay indoors until further notice. New Zealand's threat level has also been raised from low to high, while security was stepped up at mosques in the UK and France.

In the hours after the shootings, a handful of Christchurch residents returned to the mosques where the attacks took place as people struggled to come to terms with the tragedy.

In the UK, police increased patrols at mosques around the country.

The head of British counterterror police said his officers would “stand together” with Muslim communities and their counterparts in Christchurch.

“Today we will be stepping up reassurance patrols around mosques and increasing engagement with communities of all faith, giving advice on how people and places can protect themselves,” said Metropolitan Police assistant commissioner Neil Basu.

Leaders from around the world have offered their condolences and support in the aftermath of the tragedy.

Turkey’s President Recep Tayyip Erdogan called the shootings the "latest example of rising racism and Islamophobia."

Politicians around the world condemn Christchurch terror attack

Turkish Foreign Minister Mevlut Cavusoglu wrote on Twitter: "Not only the perpetrators, but also politicians & media that fuel the already escalated Islamophobia and hate in the West, are equally responsible for this heinous attack."

Imran Khan, Pakistan’s prime minister, echoed that sentiment, blaming the attack on “the current Islamophobia post-9/11 [where] 1.3 billion Muslims have collectively been blamed for any act of terror."

Iran's Foreign Minister Mohammad Javad Zarif accused Western countries of "defending demonisation of Muslims" under the pretext of "freedom of expression".

President Trump, who was praised in the gunman's manifesto as “a symbol of renewed white identity and common purpose”, condemned the "horrible massacre" and said “the US stands by New Zealand for anything we can do".

Australian prime minister Scott Morrison called the atrocity a “rightwing extremist attack” and said one suspect was Australian-born, without offering further details.

Meanwhile Ms Ardern condemned the ideology of those responsible for the massacre, saying: “You may have chosen us but we utterly reject and condemn you.

"Many of those who would have been affected by this shooting may be migrants to New Zealand. They may even be refugees here. They have chosen to make New Zealand their home and it is their home," she added.

And in Christchurch, locals were reeling from the news.

Aaron Gilligan, who was near to the site of the first attack soon after it took place, said he was shocked but was encouraged that the overwhelming message was of peace.

“This whole thing is just so very sh**, but seeing the New Zealand people’s response of love, sadness, and support for the local Muslim community is overwhelmingly beautiful and proves that events like this are the exception, not the rule – and hate has no place here today.”