Turkey may be the most Muslim nation in the world. It was forged through blood and war as a state exclusively by and for Muslims -- a claim it shares only with Pakistan. Fleeing persecution in Europe, Russia, and the Caucasus, millions of Turkish and non-Turkish Muslims settled there, and today almost half of Turkey’s 73 million citizens are descendants of these disparate peoples. This little-known story is why modern Turkey was born a Muslim nation: when the Ottoman Empire finally collapsed at the end of World War I, Muslims from all over the empire joined with ethnic Turks to defend the new nation against Christian foes -- the Allied forces, Armenians, and Greeks. Since then, the balance between this Islamic aspect of Turkey’s identity and its other -- secular nationalist -- side has guided the course of Turkish foreign policy.

Religion remained a salient national identity well into the post-Ottoman period. For example, when Greece and Turkey exchanged minority populations in the 1920s as part of the settlement of the Greco-Turkish conflict, Turkey handed over Turkish-speaking Orthodox Christians from Anatolia in return for Greek-speaking Muslims from Crete. Still, Turkish identity was not based purely on Islam: starting in the 1920s with Mustafa Kemal Atatürk, Turkey’s first president, the country’s Kemalist politicians have tried to emphasize the unifying power of nationalism. They promoted the idea of a singular, Western democratic civilization that was not only unified by religion and had room for all Turks. Turkish nationalism was secular in the sense that citizens were expected to be Westernized but could still be Muslim if they chose. Consequently, Kemalists turned Turkey’s foreign policy westward. And from the 1920s to the early part of this century, Turkish elites and governing parties adopted pro-Western foreign policies, embraced NATO, and marched closer toward EU membership.

But now Atatürk’s legacy has started to unravel. Since 2002, a party with Islamist roots, the Justice and Development Party (AKP), has unearthed Turkey’s Muslim identity. At first, many assumed that the AKP’s emphasis on Islam would not move Turkey away from the West. In fact, many heralded the AKP’s Turkey as a model democratic Muslim nation. But due to the resonance of the notion of a politically-defined “Muslim world” in the post-9/11 world, a state with a Muslim identity is especially vulnerable to viewing the world in terms of Huntingtonian clashes of civilizations.

Riding the wave of anti-Western sentiment unleashed by the 2003 Iraq war, the AKP has chilled Turkey’s relationship with the West and, instead, has tried to reposition the country as a leader of the re-christened Muslim world. It has encouraged an “us (Muslims) versus them (the West)” worldview at the expense of Turkey’s historic flexibility. In his book, Strategic Depth, the AKP Foreign Minister Ahmet Davutoğlu, summarizes this position: “Turkey’s traditionally good ties with the West are a form of alienation.” Undoubtedly, the AKP’s hostility toward the West would not have resonated with Turks before 9/11 and the wars that followed. The AKP was able to cast the war in Iraq as an attack on Muslims -- Turks included -- and place Turkey firmly on the side of the Muslim world.

The AKP, after eight years of rule -- an unusually long reign in Turkish politics (and the longest in Turkey’s democratic history if the party wins upcoming general elections in June 2011) -- has amassed enough power to turn its words into actions. Already, it has stocked the high courts with sympathetic judges, after winning a referendum that empowered the party to appoint top judges without a confirmation process. And it has sought to limit the role of the army in the government’s affairs.

Although this move may seem good for democracy, it has actually done harm. The government has used Ergenekon, the code word for an alleged nationalist organization that supposedly was plotting a coup, as an excuse to bully the military and arrest opponents, successfully neutering any opposition. The government’s use of illegal wiretaps against critics has created a republic of fear: anyone who challenges the AKP can land in jail under the most spurious of allegations. Recently, Hanefi Avcı, a police chief famous for rooting out communists in his district in the 1980s, was arrested and charged with being a member of a communist cell. This came just days after he published his memoirs, which were critical of the AKP’s methods of intimidation.

Not long ago, many would have expected the military, which has traditionally been the guardian of Turkey’s secular, nationalist identity, to intervene as politics got out of hand. But the implication of the AKP’s ever-increasing power, especially after it changed the line of succession for the military’s top brass, is that the military will bend to the AKP’s will and play along with its newfound leadership role in the Muslim world. In October, the military remained quiet when the AKP objected to NATO’s plans to place a missile defense shield in Turkey. This suggests that the AKP no longer perceives Iran and Syria as threats. And there are already signs that the military is stopping its decades-long practice of purging Islamist officers from its ranks, which would open the way for grass-roots Islamization of NATO’s second-largest army.

As the AKP goes, so will the Turkish population. Since the modernizing days of the Ottoman sultans, the political culture of the population has been imposed by the elite. And the AKP, with its coterie of Islamist billionaires, media personalities, think tanks, and universities, is Turkey’s new elite. Turkey’s population has already seemingly bought into the AKP mindset. According to a recent poll by TESEV, an Istanbul-based nongovernmental organization, the number of people identifying themselves as Muslim increased by ten percent between 2002 and 2007. Almost half of them described themselves as Islamist, which means they believe that this illiberal ideology, rather than secular democracy, should guide Turkey’s political system. This is a stark departure from Ataturk’s vision, which suggested that Turks could be Western, politically secular, and Muslim all at once.

Many Turks formerly believed that they shared values and interests with the West, making collaboration with NATO, the United States, and the European Union, beneficial. But after the rise of the AKP -- and after the 9/11 attacks and the Iraq war defined the Muslim world in opposition to the West -- that is no longer the case: according to the 2010 Transatlantic Trends report, 55 percent of Turks now feel that Turkey has such different values from the West that it is a non-Western country. And although in 2004, 73 percent of Turks believed that membership in the European Union would be a good thing, only 38 percent did in 2010. Alarmingly, according to the latest Pew Global Attitudes Project, 56 percent of Turks view the United States as a military threat. As suspicion of the West has grown, desire to cooperate with the Middle East has risen. This year, according to Transatlantic Trends, 20 percent of Turks desired more cooperation with the Middle East, compared to ten percent in 2009.

If the AKP is emphasizing Islamic identity and positioning itself as the leader of the Muslim world at home, is the Muslim world ready to accept its leadership? In fact, Turkey may be well suited for the role: in addition to its status as the seat of the Ottoman Empire, which was the heir to the caliphate, Turkey has the largest economy and most powerful military of any Muslim nation. Nonetheless, the AKP has some work to do to convince Muslim countries that Turkey is their rightful sultan. Some, including the Syrian regime, which is looking for a new, strong regional patron, might be willing to accept Turkey’s leadership. But others, such as Saudi Arabia and Egypt, will be more reluctant. They already consider themselves the center of the Muslim world.

Still, the AKP appears to have enormous popularity on the streets of Cairo and Damascus. Finally, many non-Arab Muslim countries promote their own brands of political Islam and have their own ideas about who should speak on behalf of the Muslim world. To win them over, and increase its standing in the skeptical Middle East, the AKP will cynically use Islamist causes to improve its standing with Muslim publics. For example, it might declare solidarity with Hamas (but not the secular Palestinian Authority) to agitate for Palestinian nationhood. It can also be expected to lambast European policies toward Muslim immigrants and vocally take issue with any U.S. policies involving Muslims, such as the Israel-Palestine conflict, the conflict in Sudan, and Iran.

So far, many of the AKP’s efforts to defend global Islamist causes, such as its frustrated attempt last summer to broker a nuclear deal between Iran and the West, have faltered. Still, even if Turkey cannot convince the rest of the Muslim world of its power, Turks have already bought into the AKP’s brand of us-versus-them Islam at the expense of its nationalist identity. In other words, the AKP will have its cake and eat it too unless Turks stop believing in a Huntingtonian clash between the Muslim world and the West -- or unless Kemalism reemerges to assert the nationalist, secular aspects of Turkey’s identity. And the next chance for that to happen will be the June 2011 elections, which may be the most important battle for Turkey’s soul in over two centuries, since the Ottoman sultans first turned Turkey to the West.