ITS strategic position, next to the Middle East and Russia and astride Europe and Asia, means that Turkey has always mattered. But over the past decade its significance has hugely increased. For Turkey has gone through two big, and not always widely recognised, transformations: in its economic performance and in its foreign policy.

For most of the post-war years the Turkish economy was, to reuse Tsar Nicholas I's 19th-century phrase, “the sick man of Europe”, plagued by erratic growth, soaring inflation and periodic banking busts. Today inflation is far lower, the banks are solid and Turkey boasts the fastest-growing economy in the OECD club of rich countries. Because it is resource-poor, this growth reflects fundamental strengths, especially in manufacturing and construction. Turkey makes things like furniture, cars, cement (it is the world's biggest exporter), shoes, televisions and DVD players. In a sense, it is Europe's BRIC: it might be called the China of Europe.

On foreign policy this long-standing member of NATO, with an army second in size only to America's, has always been a bulwark of the West. Turkey and Norway were the only NATO members to border the Soviet Union. But Turkey's pro-Western stance led it to neglect its neighbourhood, including many countries once in the Ottoman empire. Here, too, there has been a transformation. Backed by its strong economy, Turkey has become highly active in its diplomacy across the Middle East, in the Balkans and as far afield as Africa—and not always to the satisfaction of its allies. In a sense, Turkey has become a local diplomatic giant—the Brazil of the region.

You might imagine that Western powers would welcome such an advance. Instead, a more prosperous, bumptious Turkey is jangling many nerves. Europeans are trembling over the prospect of being asked to admit such a populous state into the European Union. The United States, which used to scold the Europeans for their reluctance, is uncomfortable with Turkey's newly adventurous foreign policy. Critics in the West are prone to hide behind the idea that Turkey is drifting towards Muslim fundamentalism and somehow “being lost” by the West. This judgment is completely wrong; yet the more that people in the West persist in making it, the greater the chance that they may genuinely lose Turkey.

The perils of democracy

In foreign policy, the government of Recep Tayyip Erdogan has certainly fallen prey on occasion to excessive Muslim solidarity. It has been too nice to Sudan's ghastly president, Omar al-Bashir, ignoring his indictment for war crimes. It made a mistake by joining Brazil in an ill-fated Iranian nuclear initiative that led to the embarrassing sight of Turkey, a member of the UN Security Council in 2009-10, voting against tougher sanctions on Iran. And its increasingly strident attacks on its once-close ally, Israel, have angered not only the Israelis but also many Americans, especially after the Turkish-led flotilla that tried to “relieve” the siege of Gaza this summer.

But wait a moment. Brazil was nice to Iran, without anyone doubting its Western credentials. On Israel, Mr Erdogan has certainly at times played to the Arab street. But many of Turkey's complaints, such as over settlement-building in the West Bank, are hardly controversial. It may have been ill-judged for the government to have been involved with those who launched the Gaza flotilla, but this would not have turned into such a catastrophe had the Israelis not killed nine people on board the leading ship. More fundamentally, the Turkish government is doing what democracies tend to do: reflecting its people's views. Many Muslims think the Palestinians have been ill-treated. From an Israeli viewpoint it is no doubt awkward to have its human-rights record questioned by an elected prime minister, rather than by the usual Arab dictators. But who would America rather hear as a Muslim voice? The autocrats in Egypt and Saudi Arabia? The clerics in Iran?

The Europeans are also in a funk—over Turkey's possible membership of the EU. Negotiations have formally been going on for over five years. No country that has begun such talks has ever failed to be offered membership. But the leaders of France, Germany, Austria and the Netherlands seem dead set against Turkish entry, as is much of their public opinion. The unresolved Cyprus dispute seems a near-insuperable roadblock. Yet if the EU chooses to exclude its own China, it will be turning away the fastest-growing economy in its neighbourhood. It will also lose any hope of influencing the region to its east. At a time when many Europeans fret about being ignored in the world, this would be an historic mistake.

How Western are they?

The common excuse for these follies is the claim that Turkey is not really Western—and is becoming ever less so. Once again, Mr Erdogan has done some unhelpful things. Critics note that, ever since his mildly Islamist Justice and Development (AK) party came to power in 2002, it has been engaged in a battle with the Kemalist secular establishment. He is intolerant of dissent, shown in his battles with critical media commentators. And he is increasingly impatient with the EU.

Yet fears of Turkey turning into the next Iran are absurd. A new tolerance of the headscarf in universities does not imply a sudden lurch into stoning adulteresses. Mr Erdogan's run-ins with his opponents have certainly created a polarised society; he should adopt a more conciliatory tone if he wins re-election next June. But his opponents in the media still write their critical columns. It is troublemakers in the army who have posed a greater threat to democracy in recent times.

In short, Turkey is heading in a good direction. It remains a shining (and rare) example in the Muslim world of a vibrant democracy with the rule of law and a thriving free-market economy. Much though Western leaders would like to turn the argument into one about Turkey, the real question is for them. Are Americans and Europeans prepared to accept Turkey for what it is: a Muslim democracy, with a different culture and diplomatic posture, but committed to economic and political liberalism? This newspaper hopes the answer is yes.