In the early hours of 4 October, 2005, Jack Straw, the then British foreign secretary, and Abdullah Gül, his Turkish counterpart, walked, tired-eyed and hand-in-hand, into a packed press conference in Luxembourg.

The EU had just opened membership talks with Ankara, in what seemed like an answer to the centuries old-question of whether the west should open its arms to Turkey. “Now we are part of Europe!” Gül proclaimed.

That was 14 years ago and a world away. Today, Britain is on its way out of the EU and Turkey looks very much as if it will not find a way in.

The UK’s departure from the EU can be seen as part of a wider phenomenon in which member states question the founding principles of the union, such as people’s freedom of movement and of an inclusive vision of Europe in the world. But Brexit also risks making things worse for other parts of the world in very direct and concrete terms – this is certainly the case for Turkey.

On a recent trip back to Istanbul and Ankara, I heard the same refrain time and again over cups of Turkish coffee: “We thought the Brits were sensible. Why are they doing this to themselves? And why are they doing this to us?”

I was in the Luxembourg press conference when Straw and Gül announced the start of the EU talks, and reported from Istanbul when the euphoria of that day was replaced by despair in the years afterwards. As western European politicians such as Angela Merkel diluted the EU’s commitment to Turkey, Recep Tayyip Erdoğan, who has ruled the country since 2003, undermined Turkey’s commitment to EU standards such as the rule of law, a free press and fundamental rights.

The anti-Turkey discourse in Europe has played into the hands of Erdoğan, who has capitalised on it to embark on his single-minded pursuit of ever greater and more personalised power.

The exception was Britain, the most fervent believer in the EU in Ankara’s eventual membership. Then came the cruellest cut of all: the 2016 EU referendum, when pro-leave politicians sought to terrify voters by telling lies about Turkey.

A week before the poll, Boris Johnson, perhaps Britain’s prime-minister-in waiting, brushed aside his own part-Turkish descent and falsely suggested “that the only way to avoid having common borders with Turkey is to vote leave and take back control”. Penny Mordaunt, now secretary of defence, said Britain could not veto Turkey’s EU accession – and repeated the lie, even after David Cameron said it was “not true”.

In other words, Brexit brought to the UK the populist politics and distortions to which Turkey had already fallen victim. As a Turkish journalist covering the Brexit debate, I found the fake news, demonisation of experts and political polarisation all too familiar.

Today both countries are facing moments of truth. With Johnson threatening a no-deal exit from the EU on 31 October, the UK faces the prospect of a more dramatic break with the EU than anyone thought three years ago.

In Turkey, things are still more fraught. In local elections in March, the opposition registered its biggest success in years, winning power in Turkey’s largest cities. In the biggest prize of all, Istanbul, Erdoğan has not respected the opposition’s wafer-thin victory. Instead, he has engineered a revote on 23 June.

If he prevails, it could mark Turkey’s final parting of the ways with democracy – and an even bigger break with Europe than the one the UK is contemplating.

The liberal forces in Turkey that are trying to pull the country away from Erdoğan’s authoritarian trajectory put their faith in the European dream – or at least in a vision of the EU. In Turkey, Europe is seen as the means of escape from autocracy.

But they are also all too aware that their task will be made much more difficult because of an unfriendly Brexiteer Britain and a Britain-less Europe.

No longer a functioning member of the club, the UK now has no voice in the EU’s enlargement debate.

Brexit also stands to hurt Turkey economically. The country has recently been hit by recession. If Britain leaves the EU without a deal, Turkey might lose access to its second largest export market, since the two economies are connected by Ankara’s customs union with the EU. At present, Turkey has a £2.8bn trade surplus with the UK.

A Turkish diplomat recently emphasised how badly Brexit will hit both countries in economic and security terms.

“It is like a meteor has hit Great Britain. And we always thought they were the most sensible nation,” he told me.

Like many other countries around the world, Turkey is watching the Brexit saga with perplexity. All the same, many in the country are nurturing the hope that sense and sensibility returns to the UK before the vortex of Brexit swallows us all.

• Elçin Poyrazlar is a Turkish columnist and author of political thrillers