WELLINGTON/CHRISTCHURCH, New Zealand, March 16 (Reuters) - N ew Zealand began to bury its dead on Saturday, a day after at least one gunman attacked worshippers in two mosques, killing 49 and injuring 42 others in what Prime Minister Jacinda Ardern called a terrorist attack.

The gunman broadcast footage of the attack on one mosque in the city of Christchurch on social media. A “manifesto” was also posted online, denouncing immigrants and calling them “invaders”.

The video footage, posted live online as the attack unfolded, showed a man driving to the mosque, entering it and shooting randomly at people inside.

Worshippers, possibly dead or wounded, lay huddled on the floor, the video showed. Reuters was unable to confirm the authenticity of the footage.

Police said three people were in custody including one man in his late 20s who had been charged with murder. He will appear in court on Saturday. Police have identified none of the suspects.

“Our investigations are in their early stages and we will be looking closely to build a picture of any of the individuals involved and all of their activities prior to this horrific event,” Police Commissioner Mike Bush said.

“There is no guarantee the risk is limited to Canterbury and we need all New Zealanders to be extra vigilant.”

Among the wounded, two were in a critical condition, including a four-year-old child, he added.

There was a heavy police presence at the hospital where families of the injured had gathered.

Dozens of people laid flowers at cordons near both locations in the South Island city, which is still rebuilding after a devastating earthquake in 2011 that killed almost 200 people.

Funerals were planned on Saturday for some of the victims, several who were born overseas.

DIVERSITY, KINDNESS

It was the worst ever peacetime mass killing in New Zealand and the country raised its security threat level to the highest, Ardern said, adding: “This can now only be described as a terrorist attack.”

“We were not chosen for this act of violence because we condone racism, because we are enclave for extremism,” Ardern said in a national address. “We were chosen for the fact that we are none of these things. It was because we represent diversity, kindness, compassion, a home for those who share our values.

“You have chosen us but we utterly reject and condemn you.”

Armed police have been deployed at several locations in all cities, unusual in a country where levels of gun violence are low.

Leaders around the world expressed sorrow and disgust at the attacks, with some deploring the demonisation of Muslims.

U.S. President Donald Trump condemned the “horrible massacre” in what the White House called a “vicious act of hate”.

‘SHOOTING EVERYONE IN THE MOSQUE’

One man who said he was at the Al Noor mosque told media the gunman burst into the mosque as worshippers were kneeling for prayers.

“He had a big gun...He came and started shooting everyone in the mosque, everywhere,” said the man, Ahmad Al-Mahmoud. He said he and others escaped by breaking through a glass door.

Facebook said it had deleted the gunman’s accounts “shortly after the livestream commenced” after being alerted by police. Facebook, Twitter and YouTube all said they had taken steps to remove copies of the videos.

Forty-one people were killed at the Al Noor mosque, seven at a mosque in the Linwood neighbourhood and one died in hospital, police said. Hospitals said children were among the victims.

The visiting Bangladesh cricket team was arriving for prayers at one of the mosques when the shooting started but all members were safe, a team coach told Reuters.

KILLINGS CONDEMNED

It was not immediately clear if the attacks at the two mosques were carried out by the same man.

Australian Prime Minister Scott Morrison said one of the men in custody was Australian.

Political and Islamic leaders across Asia and the Middle East condemned the killings and voiced concern over the targeting of Muslims.

“I blame these increasing terror attacks on the current Islamophobia post-9/11,” Pakistani Prime Minister Imran Khan posted on social media. “1.3 billion Muslims have collectively been blamed for any act of terror.”

Muslims account for just over 1 percent of New Zealand’s population, a 2013 census showed, most of whom were born overseas.

Social media was flooded with messages of shock, sympathy and solidarity.

One image shared widely was of a cartoon kiwi, the country’s national bird, weeping. Another showed a pair of figures, one in a headscarf, embracing. “This is your home and you should have been safe here” the caption reads.

Additional reporting by Tom Westbrook, John Mair and Swati Pandey in Sydney Writing by Lincoln Feast Editing by Andrew Heavens