Lately, some on the right in Washington have fretted that Turkey's religiously oriented Justice and Development Party, the AKP, will distance the country from its Western allies, eroding secularism as it seeks tighter bonds within the Middle East. After all, Prime Minister Recep Tayyip Erdogan has pushed some very sensitive Western buttons: He has dismissed concerns over Iran's nuclear program, for instance, and canceled a military exercise with Israel, holding one with Syria instead.


These moves leave plenty to worry about — including the possibility that the United States will make things worse by worrying about all the wrong things. But Erdogan's decisions do not augur the rise of an Islamist foreign policy in Turkey. The more troubling reality is that they are the inevitable outcome of long-brewing domestic trends. In limiting cooperation with Israel and improving relations with neighbors like Iran and Syria, Erdogan is playing to Turkish leftists and rightists, secularists and Islamists. He's pandering to voters who already dislike the United States and Israel while cleverly, if cynically, pursuing Turkey's national interests. A good politician from any other party would do the same.

Understanding Erdogan's political calculus starts with understanding that in Turkey anger at the West is near universal. Where Islamists see a global crusade against their faith, secular leftists see global capitalism and U.S. imperialism. Many Islamists think Israel and the United States are secretly working with the Turkish military to overthrow the democratically elected Islamist government. Conversely, many secularists think Israel and the United States are using the AKP to weaken Turkey by undermining its secular identity. According to a recent poll, 72 percent of people in Turkey believe foreign powers are working to break apart their country. It's little comfort that they disagree on how.

Turks themselves were never enthusiastic about their country's relationship with Israel. The military was, though, and for much of Turkey's recent history it controlled the country's foreign policy. Now, in an increasingly democratic Turkey with more power centers when it comes to foreign affairs, the temptation for politicians to pander to anti-Israel, anti-Semitic, and anti-Washington sentiment is hard to resist — as seen in Erdogan's recent statements.

The more impatient Washington gets with this dynamic, the worse it will be. Suggesting, for instance, that it wouldn't be so bad if the Turkish army were still running the show just plays into the hands of millions of anti-American conspiracy theorists — who are surprisingly attentive to statements from think tanks and Capitol Hill. It also feeds the illusion that the Turkish military will remain reliably pro-American. Older, higher-ranking officers continue to work closely with their U.S. counterparts. But younger officers who grew up viewing the United States as their enemy are rising through the ranks.

Fortunately, Erdogan's friendship with Iranian President Mahmoud Ahmadinejad enjoys less popular support. And though moderates decry the friendship, fringe rightists and leftists applaud it. Last June, both moderate Islamists and moderate secularists embraced the Iranian protesters as kindred spirits. To secularists, many of whom view Erdogan as little more than a Turkish Ahmadinejad, the protesters were fighting against theocracy. To Islamists, the protesters were fighting for democracy, with the ayatollahs cast in the authoritarian role of the Turkish military. After President Abdullah Gul and Erdogan rushed to congratulate Ahmadinejad on his victory, several columnists in the reliably pro-government Zaman newspaper broke with the party line to condemn the brutality on the streets of Tehran.

Meanwhile, more partisan voices on both extremes denounced the protesters as American or Zionist puppets. A secular columnist, for instance, described Neda Agha-Soltan — the protesting young woman whose death was seen around the world on YouTube — as a militant in George Soros's army who had removed the cross from her neck to pose as a protester. An Islamist paper claimed she was still wearing the cross when she was shot.

In time, democratization will help discredit the radicals on both sides. Until then, Washington's best partners remain those moderates who, whatever they think of the United States, at the very least share a mutually comprehensible view of the world.

There are also powerful economic and strategic interests driving Turkey's foreign policy of which watchers in Washington should take better notice. In recent years, a vibrantly capitalist Turkey has bolstered its regional trade to great effect, looking for markets not just in the Middle East but also in old enemies such as Armenia. Lifting visa requirements with Syria in September, for instance, has already been a boon to businessmen in southern Turkey. Russia is now the country's largest trading partner, and the Wall Street Journal reports that Turkey's trade with Sudan has tripled since 2006. Iran, meanwhile, is a major source of cheap natural gas, keeping Turkey's economy growing. How shocked can the United States be if that makes Ahmadinejad look a little less despotic in Ankara?

Turkey is acutely aware that economic success is crucial to securing European Union membership. Indeed, Ankara has promoted its EU candidacy by claiming that it will help expand Europe's influence in the Middle East; the AKP has offered Turkey's services as a mediator between Syria and Israel as well as between Iran and the United States. Turkish politicians and intellectuals are quick to point out that they will be more useful to their allies if they are also on good terms with their allies' enemies. Being a bridge between East and West, they say, requires having a footing in the East as well.

Yet in trying to turn its dual identity into a strategic asset, Turkey runs the perpetual risk of finding itself rejected by both sides — too Muslim and Middle Eastern for the Europeans, and too secular and pro-American for the Middle Easterners. Europeans might be more tolerant than Americans when it comes to entreaties to Iran and Iran's criticism of Israel, but only up to a point. Recently, the AKP seems to have realized it went too far for EU tastes in preparing to welcome Sudanese President Omar Hassan al-Bashir to Istanbul. Meanwhile, Turkey's relations with the Arab world have always been worse than many people realize. The Ottoman Empire, for one, is not fondly remembered by many of its former subjects. Turkey opposed Algerian independence in 1955 and almost attacked Syria in 1998. With the Cold War over and a resolution to Turkey's perennial Kurdish problem in sight, the general consensus in Ankara is that it's high time Turkey patched things up with the East as well.

The hostility Turks feel toward their allies is alarming. Their desire for peace and prosperity in the region is not. Ultimately, the challenge for Washington is to keep this distinction in mind when deciding how worried to get over developments in Turkey. Erdogan's challenge is even harder. He has to get what he can from Turkey's new friends in the East while also keeping — and, if necessary, publicly defending — Turkey's friends in the West.