Turkish President Recep Tayyip Erdogan has called on New Zealand to restore the death penalty for the gunman who killed 50 people at two Christchurch mosques, warning that Turkey would make the attacker pay for his act if New Zealand did not.

Key points: Mr Erdogan has been campaigning ahead of local elections on March 31

Mr Erdogan has been campaigning ahead of local elections on March 31 In his speeches, he has used excerpts of the video taken in the Christchurch attack

In his speeches, he has used excerpts of the video taken in the Christchurch attack Mr Erdogan said the mosque attacks in New Zealand were part of a global attack on Islam

Australian Brenton Tarrant, 28, a suspected white supremacist, was charged with murder on Saturday after a lone gunman opened fire at the two mosques during prayers on Friday.

"You heinously killed 50 of our siblings. You will pay for this," Mr Erdogan told an election rally of thousands in northern Turkey.

"If New Zealand doesn't make you, we know how to make you pay one way or another."

Making reference to Turkey's victory over Australian and New Zealand troops in Gallipoli, the Turkish President threatened that anyone who came to Turkey with anti-Muslim sentiments would be sent back in coffins.

Mr Erdogan has been touring the country ahead of local elections set to take place on March 31, drumming up support for his Islamist-rooted AK Party.

Ignoring widespread criticism, he again showed excerpts of a video taken by the attacker during the mosque shootings and denounced what he called rising hatred and prejudice against Islam.

He said Turkey was wrong to have abolished the death penalty 15 years ago, and added that New Zealand should make legal arrangements so the Christchurch gunman could face capital punishment.

The attacks took place as Muslims gathered for prayers. ( ABC News: Brendan Esposito )

'Your grandparents … returned in caskets'

On Monday, Mr Erdogan spoke at a rally on the Gallipoli peninsula where Ottoman soldiers defeated British-led forces including Australian and New Zealand troops trying to seize the peninsula, a gateway to Istanbul.

He spoke of the mosque attacks in New Zealand as part of a wider attack on Turkey and evidence of a global anti-Muslim sentiment.

"They are testing us from 16,500 kilometres away, from New Zealand, with the messages they are giving from there," he said. "This isn't an individual act, this is organised."

Mr Erdogan criticised New Zealand and Australia for sending troops to Turkey in the World War I Gallipoli campaign, claiming their motive was anti-Islam-oriented.

"Your grandparents came here … and they returned in caskets," he said. "Have no doubt we will send you back like your grandfathers."

Hundreds of New Zealanders and Australians travel to Canakkale each year for Anzac Day on April 25, to mark the start of the battle of Gallipoli and to commemorate the dead.

Video aired at rally despite criticism

Space to play or pause, M to mute, left and right arrows to seek, up and down arrows for volume. Watch Duration: 51 seconds 51 s Christchurch residents bring flowers to pay tribute to the mosque terror attack victims.

Since the attack in Christchurch, Mr Erdogan has been using clips from the graphic video filmed by the gunman to denounce Islamophobia during campaign rallies.

The video, which was blurred but had clear sounds of automatic gunfire, has been shown to thousands of people at the rallies and aired live on Turkish television, despite efforts by New Zealand to halt its spread.

The video prompted widespread condemnation. Facebook said it removed 1.5 million versions of the video in the first 24 hours after the attack.

Turkey's main opposition party has also criticised Mr Erdogan for showing the clip "for the sake of [winning] three or five votes" at the elections.

Foreign Minister Winston Peters said Monday that he told his Turkish counterpart that Mr Erdogan's use of the footage in an election campaign was wrong.

"Anything of that nature that misrepresents this country, given that this was a non-New Zealand citizen, imperils the future and safety of the New Zealand people and our people abroad, and that is totally unfair," Mr Peters said.

But Mr Erdogan has continued to air the video and share an extract from the shooter's manifesto during his speeches.

Mr Erdogan's AK Party, which has dominated Turkish politics for more than 16 years, is battling for votes as the economy tips into recession after years of strong growth.

Mr Erdogan has been touring the country ahead of local elections set to take place on March 31. ( AP: Burhan Ozbilici )

He has cast the local elections as a "matter of survival" in the face of threats including Kurdish militants, Islamophobia and incidents such as the New Zealand shootings.

A senior Turkish security source said the Australian man accused of the shootings entered Turkey twice in 2016.

Turkish authorities have begun investigating everything from hotel records to camera footage to try to ascertain the reason for his visits, the source said.

ABC/wires