The Turkish president, Recep Tayyip Erdoğan, has tried to smooth over his diplomatic row with New Zealand by saying Jacinda Ardern’s empathy after the deadly mosque attacks in Christchurch was an example to the world.

Erdoğan has been accused of exploiting the attack in his local election campaign by screening video footage of the assault at his rallies, and claiming the killings were not the work of a single gunman.

At a rally in Çanakkale, Erdoğan invoked the Gallipoli campaign against Anzac troops in the first world war, saying anyone who went to Turkey for anti-Muslim reasons would be returned “in coffins” as their grandfathers had been. His spokesman said he had been quoted out of context.

New Zealand’s deputy prime minister, Winston Peters, is in Istanbul for an Organisation of Islamic Cooperation meeting and Ardern has asked him to demand an explanation from Erdoğan, and hold substantial talks.

Peters said: “I certainly intend to put New Zealand’s record as being an innocent party to an act of a foreigner in our country.”

However, when asked during a question-and-answer session, Peters said he had not brought up the use of the video with Erdoğan, as he understood the president had stopped using it.

“I felt that I did not have to ask, because they are not doing that anymore,” Peters told reporters after his meeting with the Turkish president.

Peters said Erdoğan reassured him that Australian and New Zealand citizens coming to Turkey would be welcome and that the initial “misinterpretations” were all cleared up.

He also suggested that if convicted the Christchurch suspect would “spend the rest of his life in isolation in a New Zealand prison”.

In his speech to the OIC meeting, Erdoğan also tried to end the dispute by thanking the people and authorities of New Zealand for their sensitivity and determination against the attack, saying the prime minister personally had been an example to world leaders.

“I would like to thank the government, especially the prime minister, on behalf of myself, my country and my organisation for their determined stance against the event. The reaction, and the empathy on display, should be an example to all world leaders,” he said.

He added: “We must not let this brutal act of terrorism go into oblivion.”

Erdoğan criticised populist politicians who he said encouraged attacks on Muslims and refugees.

He said: “Politicians who pave themselves the road to power by alienating Muslims and creating enemies out of refugees must pull themselves together.”

Erdoğan argued Muslims were not the only ones affected by “rising cultural racism”. But he called on the world to fight Islamophobia with the same determination as antisemitism was combatted after the Holocaust.

He said the assault that led to the death of 50 people in New Zealand should be regarded not as an isolated event, but as the tip of an iceberg. “From the manifesto to the horrific images, the date, the name, the place on the weapon, many things prove this fact. The New Zealand attack is neither the first nor the last attack targeting Muslims,” he said.

“We can’t solve problems by sweeping them under the carpet. We cannot treat social diseases by ignoring them. We can’t get away from problems by hiding. We cannot respond to the issues that threaten us and all humanity with silence.”

He said too often those who mounted such assaults claimed they were simply an individual criminal or psychologically distressed. He added: “By punishing this terrorist as he deserves, by revealing all of his connections, we must give a very strong message to those who have the same enthusiasm.”

Peters, also speaking at the OIC conference, said: “Ensuring Muslim communities in New Zealand feel safe and secure is a particular focus.”

The deputy leader, who is also the foreign minister, said New Zealand authorities would make sure “no stone stays unturned” in the prosecution of the alleged attacker.