For a Bush administration that sometimes talks as if democratization in the Muslim world will be all sweetness and light, Turkey provides a reality check. Here, democratic reforms have opened a once-tranquil Turkish-American relationship to a noisy and occasionally nasty public debate.

Turkey's prime minister, Recep Tayyip Erdogan, arrives in Washington next week for a meeting with President Bush. For both sides, it will be a chance to repair some of the damage of the past several years, during which time disagreements over Iraq have badly frayed the once solid Turkish-American relationship.

Both sides seem eager to restore a strategic partnership. Erdogan wants to reassure Bush that Turkey is on a steady course toward reform, according to one of his advisers. The administration wants to reaffirm support for Turkey, but it also wants to hear how Erdogan plans to combat the recent eruptions of anti-Americanism, says a senior U.S. official.

"It could be a make-or-break kind of visit," argues Soli Ozel, a professor at Istanbul Bilgi University. To put the partnership back together, he says, "Both sides need to be honest about expressing their interests -- where they clash and where they coincide."

The Erdogan government, in theory, is a model of what the United States would like to see more of in the Muslim world. His party is committed to free-market reforms and democratic freedoms. It's also a quasi-religious party with deep roots among Turkey's Muslim population. In that sense, it promises the possibility of modern, tolerant Islamic politics in a state that remains officially secular.

Bush lauded Erdogan as a religious-minded reformer when the two first met in late 2002. He welcomed the Turkish politician, saying: "You and I both believe in the Almighty, and we're not ashamed to admit it. I think we're going to get along," according to a Turkish official who was present.

Then came the Iraq war, which many Turks opposed. Washington was furious that the Turkish parliament refused to allow American troops to invade from Turkey. Ankara was upset by the chaotic vacuum that followed Saddam Hussein's ouster, and by the U.S. failure to control fighters from the extremist Kurdish PKK party. Anti-American diatribes began to fill the Turkish press, and by last fall's U.S. offensive in Fallujah, a prominent member of Erdogan's party was quoted as accusing the United States of "genocide."

Turkey's once-close relations with Israel have also deteriorated under the Erdogan government. And according to Silvyo Ovadya, president of the Jewish community in Turkey, there has been a rise in anti-Semitism in Turkey the past several years, with "Mein Kampf" and other anti-Semitic books becoming bestsellers. He says the government has taken some steps to curb this trend among Muslim extremists, but he wishes Erdogan would do more.

Once upon a time, these problems would have been almost unthinkable. Turkey was Israel's best friend in the Muslim world and a crucial NATO ally throughout the Cold War. "For many years, this relationship was a kind of relationship between elites -- security elites," U.S. Ambassador Eric Edelman explained in a recent interview with the Turkish newspaper Radikal. Now, with a more democratic Turkey, "you have to deal not just with elites but also with a broader dimension of public opinion." And that public debate is sometimes animated by a sharp anti-Americanism.

After Turkish military and business leaders began complaining early this year that the anti-Americanism was veering out of control, Erdogan altered course. He approved new rights for U.S. military aircraft at Incirlik air base in southeastern Turkey, he affirmed the importance of good relations with America in a speech to his party, and he traveled to Israel.

What should reassure Washington is Turkey's mature reaction to the votes in France and the Netherlands rejecting the proposed European Union constitution, despite widespread commentary that they reflected, in part, voters' hostility toward eventual Turkish entry into the E.U. Ali Babacan, Turkey's lead E.U. negotiator, says accession talks will begin Oct. 3, as scheduled. "We should be patient and work very hard," he says. "Every year that goes by will bring Turkey's standards one step forward." He suggests that even if Europe rejects his country, Turkey will be better off for making the reforms the European Union is demanding.

A democratic Turkey may be noisier, and its public debate may give the United States occasional heartburn. But if it stays on course toward joining Europe, it should also be a freer, more stable and more prosperous place. And that, argues Egemen Bagis, a top adviser to the prime minister, "is the antidote to the biggest fear we all have -- the clash of civilizations."