Who says empires are bad? The multi-ethnic Ottoman Turkish Empire, like the coeval multi-ethnic Hapsburg Austrian one, was more hospitable to minorities than the uni-ethnic democratic states that immediately succeeded it. The Ottoman caliphate welcomed Turkish, Kurdish, and other Muslims with open arms, and tolerated Christian Armenians and Jews. The secular-minded, modernizing "Young Turk" politicians who brought down the empire did not. They used Kurds as subcontractors in a full-scale assault on Armenians, which scholars now argue about calling genocide. Ottoman toleration was built on territorial indifference. Because the same loosely administered imperial rule extended from the Balkans to Mesopotamia, and as far south as Yemen, minorities could live anywhere within this space without provoking issues of sovereignty. Violent discussions over what group got to control which territory emerged only when the empire came to an end, after World War I.

The collapse of the Ottoman sultanate continues to haunt geopolitics: it gave birth to questions about the territorial status of Christians in Lebanon and of Jews in Palestine, and about whether Kurds north of Baghdad should live in the same polity as Mesopotamian Arabs to the south. Moreover, it changed the direction of Muslim thought. For 850 years—from 1071, when the Seljuks defeated the Byzantines at Manzikert, in eastern Anatolia, to the end of World War I—the House of Islam had drawn its spiritual direction from Turkey, not from Arabia or Iran. But with the official abolition of the Constantinople-based caliphate, in 1924, there was no longer any universally accepted authority for the interpretation of Muslim law. In the competition for doctrinal legitimacy that has followed, the most radical interpretations have won out.

Within Asia Minor itself, anarchy and invasion following the Great War led to the emergence of Mustafa Kemal Atatürk's fiercely secularist regime, which delivered stability and a pro-Western orientation, but at a significant cost. The cost was a militarized state and the suppression of Islam—under which the Anatolian peasantry and working class increasingly chafed. Democracy developed late and anemically, leading to ineffectual minority governments. Because Turkish politicians assumed that the military would always rescue them in the lurch, at a subliminal level they never felt the need to act responsibly—and so they didn't.

The first break in this dreary chronicle was the election of Turgut Ozal to the prime ministership, in 1983. Ozal was a wily politician from the heartland of Asia Minor who shared the deep religiosity and crass nouveau riche tastes of many Turks. He loved to read the Koran and watch soap operas, to bang his head against the carpet in a Sufi mosque and go to Texas barbecues. He restored religion to Turkey's political space without threatening the country's pro-Western orientation or its tendency toward tolerance. He gradually wrested control over foreign policy away from the military—a healthy thing for an elected politician to do. By the early 1990s he was veering toward a neo-Ottomanism that would have effected a grand compromise with the Kurds, based on the Islamic faith that Turks and Kurds had in common. But Ozal died suddenly of a heart attack in 1993. It was said that he ate himself to death, just as Atatürk had drunk himself to death.

Because Turkey, like Tunisia, is a real state and not (like so many other places in the Middle East, Iraq included) just a geographical figure of speech, things don't collapse there; they simply go lugubriously downhill. The corruption and irresponsibility of lackluster, forgettable politicians became so extreme in the late 1990s that the military re-emerged in the guise of a National Security Council, which engineered, in stages, what became known as a soft coup. One analyst told me at the time, speaking of the council's meetings, "The generals bring thick dossiers from which to lecture, and the civilian cabinet ministers come as tourists to listen."

At the same time, something began to happen within Turkey's Islamic movement. A group of disciples parted ways with Necmettin Erbakan, their longtime mentor and the grand old man of Turkish Islam. Erbakan's movement had been involved in the hurly-burly of party politics for decades, and was thus intrinsically more Westernized than its counterparts in the Arab world. Nevertheless, Erbakan's visits to Libya and Iran, and his support for a religious school system that would have churned out Muslim firebrands, alienated him from the mass of middle-class voters. And so in 2001 the Justice and Development Party came into being. Its leader was one Recep Tayyip Erdogan, a politician in his forties who grew up poor in Kasimpasha, one of Istanbul's most notoriously crime-infested districts. Erdogan spoke no foreign languages. His wife wore a headscarf. He was hopelessly unsophisticated by the standards of Turkey's Europeanized ruling class. Yet he was a skilled politician, armed with a management degree, who had been a popular mayor of Istanbul in the mid-1990s, adroit at improving utilities, cleaning the streets, and making municipal authorities more accessible through telephone hotlines.

By 2002, when the United States had conquered Afghanistan and was in the early stages of planning to invade Iraq, Erdogan, a devout Muslim, had emerged as not just the most popular politician in Turkey but also—so fed up were Turkish voters with the whiskey-sipping secular nonentities who had led their country to political and economic ruin—the only popular politician in Turkey.

In breaking away from his powerful mentor Erbakan (after whom he had named a son), Tayyip Erdogan was able to emphasize his reformist credentials and reach beyond the Islamist base. He was seen as sincere and authentic. He wasn't just another Turkish politician on the make but, rather, a competent manager who made things happen. By the late summer of 2002 opinion polls showed that in the coming November election his party would win by a landslide, without the need for coalition partners. The Justice and Development Party achieved its overwhelming popularity even though Erdogan himself had recently been technically barred from running for Parliament, as part of a last-gasp attempt by the Turkish military to keep an Islamist party, however moderate, from assuming power. The Bush Administration should have been talking with Erdogan before the election, through back channels, to find out his terms regarding support for an invasion of Iraq. But Washington was so locked into an old-fashioned paradigm about Turkey—based on the idea that it could always rely on the military there—that it did not even pressure the military authorities to lift the ban on Erdogan's political activity. Of course the Justice and Development Party won handily—and it owed the Bush Administration nothing when it did so. Because the ban on Erdogan had to be rescinded before he could become Prime Minister, for a few months the job went to his colleague Abdullah Gul.

One of Erdogan's enduring traits as a politician is his lack of small-mindedness. Thus, despite the cold shoulder he initially got from Washington, he worked arduously behind the scenes to get parliamentary approval for U.S. troops to pass through Turkey en route to Iraq. He failed by only a whisker, and not just because of recalcitrant Islamists in his own party but also because the secular opposition in Parliament—the Republican People's Party—gave no support to the United States. Erdogan's lobbying effort came immediately after his party, which had no previous governing experience, assumed power. The job wasn't made any easier by the fact that legally he wasn't yet the Prime Minister, or even a member of Parliament.

Erdogan's moderate, reformist Islam now offers the single best hope for reconciling Muslims—from Morocco to Indonesia—with twenty-first-century social and political realities. The Bush Administration understood this too late to save itself from the fiasco of March 2003, when Turkey failed to authorize the passage of U.S. troops. But what about the Europeans?

This December a hesitant European Union will decide whether to open negotiations for Turkey to join. Its hesitancy has legitimate and illegitimate reasons. The legitimate ones center on the difficulty of digesting a country of 70 million people—one that is far poorer and more populous than many of the Central and Eastern European nations recently admitted to the EU. The illegitimate ones center on the fact that—well, Turkey is Muslim. Does Europe want that many Muslims within its community?

The answer should be that Europe has no choice. It is becoming Muslim anyway, in a demographic equivalent of the Islamic conquest of the early Middle Ages, when the Ottoman Empire reached the gates of Vienna. More to the point, Turkey is not only contiguous to Europe but also is already economically intertwined with it. The only issue that remains is whether Europe will encourage Islamic moderation through economic development in Turkey. Though American troops are fighting and dying in Iraq, ultimately the Europeans, because of geography and their own demographic patterns, have more at stake in the stabilization of the region. And the surest way to advance that stabilization is to make Turkey part of Europe.

Never before has the West been so lucky in Turkey as now. The re-Islamization of Turkey through the rejuvenation of the country's Ottoman roots was going to happen anyway; Atatürk's republican-minded secularization had simply gone too far. The only question was whether this retrenchment from Kemalism would take a radical or a moderate path. Erdogan's political leanings suggest the latter. Europe should seize the opportunity.