New Zealand and Turkey have a special Anzac bond. The conflict that divided them at Gallipoli now brings them together each year. Anzac Day celebrations in Turkey usually attract thousands of New Zealanders who receive a warm welcome there.

Gallipoli played an important part too in the development of both countries. It is sometimes said that the New Zealand experience at Gallipoli and the Western front in World War 1 helped make us an independent nation. In the fires of war we supposedly forged a new sense of our country and its strengths. There is at least some truth in this.

Gallipoli was certainly important in the development of modern Turkey. Kemal Mustafa, later known as Ataturk, the founder of modern, secular Turkey, commanded the Turkish soldiers who fought bravely and successfully against the Anzac invasion of their country. It was there that Ataturk showed his astonishing charisma and leadership talent.

His famous command to his soldiers to hurl themselves at the Anzacs - "I order you to die" - has an eloquent horror: it was, in a sense, what the British generals then and later in Europe ordered Anzac soldiers to do, but not so bluntly.

Ataturk morphed from the merciless and gifted enemy general to the man who famously reassured Anzac mothers about their dead sons who "lie side by side here in this country of ours ... You, the mothers who sent their sons from faraway countries, wipe away your tears; your sons are now lying in our bosom and are in peace. After having lost their lives on this land they have become our sons as well."

That is a moving statement of the ties between our two countries. But it is also a reminder of the now growing gap between them.

Turkey's president, Recep Tayyip Erdogan, who once visited New Zealand, is now a clear threat to Turkish democracy. He has become a despotic populist in the mould of Russia's Vladimir Putin, who observes the forms of democracy while subverting its deepest values.

Erdogan's narrow victory in the recent referendum will give him great personal power and strip parliament of its ability to restrain him. Erdogan has increasingly played the Islamist card, even while insisting that he remains committed to the thoroughgoing democratic secularism of Ataturk.

In fact he no longer seems inclined even to disguise his ambition to become dictator. His campaign to bring back the death penalty will further jeopardise his attempts to join the European Union, but he no longer seems to care much.

Erdogan has preyed on his country's fears - of refugees, terrorists and an over-powerful army - and has as a result merely heightened the violence that now marks everyday life in Turkey.

The demagogue is the true enemy of democracy, because he undermines everything central to it: human rights, respect for minorities, the rule of law and the necessity of checks and balances.

Today's Anzac-Turkish commemorations in Gallipoli take place under the threat of terrorist attack in a country that is splintering.

That is a tragedy which will reverberate in New Zealand on this special day.