The New Zealand government has criticised Turkey’s president, Recep Tayyip Erdoğan, after he repeatedly showed video footage of the Christchurch mosque attacks to crowds at election rallies.

Erdoğan said he would send home “in caskets” anyone attempting such an attack in Turkey, which he claimed was not the work of a lone gunman.

New Zealand’s foreign minister, Winston Peters, rebuked Erdoğan for using footage of the shootings, saying it could endanger New Zealanders abroad. Erdoğan also displayed extracts from a “manifesto” posted online by the suspected attacker and later taken down.

Erdoğan, facing an uphill battle in local elections at the end of the month due to Turkey’s deep economic difficulties, which include high inflation and a construction crisis, claimed part of the Christchurch suspect’s manifesto was to keep Turks out of Europe, and said the attack was part of a worldwide campaign of Islamophobia.

Ironically, Turkey’s vice-president, Fuat Oktay, had earlier called for all sides to stop using inflammatory language in the wake of the Christchurch attacks.

Brenton Tarrant, 28, an Australian suspected white supremacist, was charged with murder on Saturday after 50 people were killed in the attacks on two mosques in Christchurch.

Erdoğan, trying to rally support for his AK party in the 31 March local elections, said: “They are testing us from 16,500km away, from New Zealand, with the messages they are giving from there. This isn’t an individual act, this is organised.”

Erdoğan also showed grainy video footage of the shootings, which the gunman had broadcast live on Facebook. He also displayed on giant screens extracts from the so-called manifesto allegedly prepared by the suspect asserting he wanted to drive Turks from Turkey’s north-western, European region. Half of Istanbul, Turkey’s largest city, spans the eastern side of the Bosphorus, with its European half to the west.

“We have been here for 1,000 years and will be here until the apocalypse, God willing,” Erdogan told an annual rally on Monday commemorating the 1915 Gallipoli campaign during the first world war, when Ottoman soldiers defeated British-led forces including Australian and New Zealand troops trying to seize the peninsula, a gateway to Istanbul.

“You will not turn Istanbul into Constantinople,” he added, referring to the city’s name under its Christian Byzantine rulers before it was conquered by Muslim Ottomans in 1453.

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

The suspect in the Christchurch shootings is reported to have visited Turkey twice, but the purpose of his visits is not known.

Referring to the gunman’s manifesto, Erdoğan told a rally in Gaziantep: “What does it say? That we shouldn’t go west of the Bosphorus, meaning Europe. Otherwise he would come to Istanbul, kill us all, drive us out of our land.”

New Zealand has been campaigning for Facebook and other social media sites to take down the video of the killing, and its government will be exasperated that a world leader thought it was appropriate to show the footage.

Speaking after a meeting of the New Zealand cabinet, Peters said: “Anything of that nature that misrepresents this country – given that [the suspect] was a non-New Zealand citizen – imperils the future and safety of the New Zealand people and our people abroad and it’s totally unfair.

“We had a long dialogue on the need for any other country, or Turkey for that matter, to ensure that our country, New Zealand, was not misrepresented.”

Oktay had earlier called on the world to stop using “provocative” language after the terrorist attacks at the two New Zealand mosques.

“We have to start using different language. The entire world has to stop promoting some type of provocative language,” Oktay said..