In four years as foreign secretary, which capital of another country did I call most often after Washington DC? Berlin, you might think? Good guess, but no. Paris, surely? Nearly right, but not quite. The answer is Ankara. This was partly because my counterpart was the highly intelligent and rather talkative Ahmet Davutoglu, now Prime Minister of Turkey, who had an opinion, a proposal and a response to everything. But it was also because so many diplomatic roads lead to his country, from dealing with the Syrian crisis, to resolving the Cyprus question, to Nato’s relations with Russia. As I write, European Union (EU) leaders are locked in talks with Turkey because for millions of migrants, the physical roads, too, lead in and out of her borders. Germany has exacerbated Europe’s crisis by adopting a policy that has encouraged more migrants to attempt the journey across the Aegean, but with or without a change of direction by Angela Merkel, no one can control the flow of people towards Europe without cutting a deal with Turkey. The vital strategic position of Turkey is one reason why the longstanding and cross-party British position has been to support Turkish membership of the EU. There are other reasons, too: Such membership would anchor a democratic Muslim nation in permanent cooperation with the West and enlarge the single market to another 80 million people with huge potential to be a prosperous and outward-looking nation.

Yet, there has been little progress in recent years towards achieving this goal. Cyprus and France have regularly blocked the opening of new chapters of negotiations, while a short discussion on the matter with German or Austrian leaders is enough to show how far their countries are from accepting Turks at the EU table on equal terms. It is impossible to know how much European reluctance to embrace Turkey has contributed to a new and reciprocal indifference in Ankara to European opinion, but it certainly has not helped.

Belatedly, Brussels has discovered how important it is to work with the Turkish government just as Ankara has started to move off in a different direction — and a direction we cannot welcome. For whatever reasons of national pride, religious conviction, action against terrorism or fear of losing office, Turkey under President Recep Tayyip Erdogan is moving in a less democratic and more authoritarian direction, with all the hallmarks of one man craving too much power for too long.

The latest instance of this is the closing down of an opposition newspaper and its re-opening as an enthusiastic supporter of the president, adding to a list of actions that politicise or ignore the judiciary, restrict freedom of speech and hamper legitimate opposition. Turkey is beginning to look more like a developing country on the wrong political path and less like a developed country on the right one.

This is a tragedy for many Turks, and all the more so because a foreign policy once based on the idea of harmony with all neighbours has collapsed, leaving relations with Russia, Armenia and the Kurds as bad as at any point in recent decades. Whatever impression her president may give, Turkey is going to need some friends. The massive extent of the migrant crisis, which is already far worse this year than last, is now driving EU and Turkish leaders together in summits they all need: The EU needs migrant routes to be controlled and Turkey needs to boost its much-diminished economic growth. But an honest assessment of the last deal of this kind would be that it has not been implemented by either side, and there must be a high chance that what is agreed this week proves extremely fragile and hard to deliver.

What is needed now is for European leaders to have the vision to fashion a new framework for future ties with Turkey. The factors causing huge potential movements of people are not going to disappear in the near future: Instability along with booming populations in the Middle East and East Africa will be with us for years, and it will not be possible to hold a crisis summit with Turkey every few months for the next three decades. A new framework is needed because those who have championed Turkey as a EU member for many years have to recognise that its authoritarian direction means that it cannot be a full member of the EU, and that continued pursuit of that goal, for the time being at least, will achieve nothing. But at the same time, those who have been hostile to any idea of Turkish membership now must accept that the absence of any cooperation with the Turks will spell disaster for Europe.

The way forward is to propose close and permanent links between the EU and Turkey without full membership: A kind of associate membership. This could involve Turkish membership of the single market and participation in Europe’s trade deals with the rest of the world, but without full freedom of movement of people. It could be based on co-operation in foreign affairs, but no linking of criminal justice systems. Like Britain, Turkey would not be committed to “ever-closer union”, and there would be no question of joining the euro. Difficult to frame and agree though this would be, it is time it was advocated, for the alternatives are now either impossible or catastrophic. The advantages would be immense: The strategic orientation of Turkey to the West would be confirmed for the long term, Cyprus could more easily be settled, and Balkan countries now caught in a dangerous no man’s land between Europe and Russia would have a model they could follow. Most importantly, the total rejection of Turkey would be avoided and its prosperity more assured. There is, of course, one massive problem to overcome.

The EU does not have associate membership, and would be frightened to create it. But as the 21st century develops, it is increasingly clear that the future of Europe is two-tier: The Eurozone needs tighter integration if it is to survive, while other nations — including the United Kingdom, if it votes to remain in, will be happier in an outer tier, opting into some things and out of others. A new form of membership for Turkey is simply an extension of that idea. It may have risks, but the risks of having no future, viable vision for Europe’s most vital flank are very great indeed.

— Telegraph Group Limited, London 2016

William Hague is the former British foreign secretary and a former leader of the Conservative Party.