Updated

Turkish President Recep Tayyip Erdogan, campaigning for votes in local elections this month, has sparked a diplomatic spat with New Zealand and Australia by portraying the Christchurch mosque shooting and a World War I battle as targeting Islam.

Australian Prime Minister Scott Morrison summoned Turkey's ambassador on Wednesday and demanded that Erdogan take back comments suggesting that Australians and New Zealanders had sent troops to fight Turkey in the WWI Gallipoli campaign motivated by an opposition to Islam.

In more inflammatory comments, Erdogan has also said that Australians and New Zealanders traveling to Turkey with anti-Muslim sentiments would be sent back in coffins, "like their grandfathers" were in the Gallipoli campaign.

Morrison's government issued a travel advisory warning people visiting the Gallipoli battlefields for remembrance ceremonies during the anniversary of the campaign next month to exercise caution.

Morrison said "all options are on the table" if Erdogan does not withdraw his comments.

Turkish Foreign Minister Mevlut Cavusoglu later held a telephone a conversation with his Australian counterpart, Marise Payne, Turkish Foreign Ministry officials said. They did not provide further details about the call.

Ignoring widespread criticism, Erdogan at his campaign rallies has been screening excerpts of a video taken by the gunman who killed 50 people in mosques in Christchurch, to denounce what he calls rising hatred and prejudice against Islam.

He has also been showing parts of a manifesto said to have been left by the gunman in which he threatens Turks and Erdogan himself.

On Wednesday, Erdogan — inaugurating a theme park in Ankara as part of his campaign for the March 31 elections — called for votes for his ruling party candidates as a response to "occupiers who attempt to threaten our nation from tens of thousands of kilometers away."