At least 49 people were killed and dozens wounded when the gunman, identified as a 28-year-old Australian right-wing extremist, opened fire on worshippers in two mosques.

"Our hearts are with all victims, their families and the people of New Zealand following the cowardly terrorist attacks against Muslims at the Al Noor and Linwood mosques in Christchurch, New Zealand," the former president wrote on Facebook.

"There must be no place in the world today for terrorists, hiding under the cloak of ideology or creed, to visit violence on innocent citizens on the basis of their faith. We pray for healing and strength for the wounded. May their spirits never be broken by these lowly acts of cowardice.

"But while we pray for New Zealand, we must take proactive steps to curb any adverse effects on our democracy by our own homegrown brand of partisan militant vigilantes," he further noted.

A video live-streamed by the assailant on Facebook showed him rapidly firing what appeared to be hundreds of bullets at his defenseless victims using various weapons.

Meanwhile, New Zealand's prime minister has vowed to toughen the country's gun laws after revealing Saturday that the man charged with murdering 49 people in two mosques legally purchased the arsenal of firearms used in the massacre.

Jacinda Ardern said the gunman, a 28-year-old Australian, obtained a "Category A" gun licence in November 2017 and began purchasing the five weapons used in Friday's attacks in the southern city of Christchurch the following month.

The firearms included two semi-automatic rifles, two shotguns and a lever-action weapon, she said, speaking to reporters in Wellington, before heading to Christchurch.

(Additional files were added from AFP)