LONDON—Is Recep Tayyip Erdogan, Turkey’s recently re-elected prime minister, a closet fundamentalist waiting for the right opportunity to dismantle the legacy of Kemal Ataturk, the architect of his country’s secular republic? Or is he the man who will set a model for the Muslim world by reconciling Islam with Western-style rule of law, the separation of state and religion, the market economy, and the European Union, which he wants Turkey to join?

There are strong arguments to justify both views—hence the extraordinary importance of what is going on these days in a country that could be more pivotal even than Pakistan for the West’s relationship with Islam. Before he was first elected prime minister in 2002, Erdogan did little to hide his Islamist convictions. His Justice and Development Party and many of his voters were clearly intent on rolling back the frontiers of the secular state built after World War I and letting religious dogma infiltrate Turkey’s institutions. But since gaining power, Erdogan has been careful, for the most part, not to give ammunition to the Westernized intellectual elites and the middle classes terrified of Islamization.

Instead, he has opened up the economy with astounding results, relaxed some of the authoritarian vestiges of the militarized republic he inherited, and started negotiations for entry into the European Union. Yes, a few months ago he tried to get his foreign minister, Abdullah Gul, whom many perceive as a threat to secularism, appointed president. That triggered a ferocious response from many Turks, especially the military—the traditional and ruthless guarantor of Ataturk’s secular legacy. But even though the Turkish electorate vindicated Erdogan at the polls a few days ago by re-electing him, he has signaled that he will seek a less controversial figure to fill the presidency, a ceremonial though influential post. He has also promised further liberalization, something that would make it hard to push an Islamist agenda later on even if this was all a tactical ploy to avoid an early confrontation with the military.

Unlike Iran, where the shah’s forceful secularism provoked a fanatical Shiite revolution, Turkey’s authoritarian secularism has so far led to a sort of Islam “lite” that could conceivably, if Erdogan and his successors continue along the current path, hold fundamentalism in check through democracy and global economics. That would mark a steep contrast with Syria, Egypt and Algeria, where the weapon against jihadism has been corrupt despotism.

Of course, we cannot yet be certain of what Erdogan has in mind. At this stage, nobody knows if Erdogan really wants to reconcile Islam and the West, establishing a worthy precedent in a Muslim world currently caught between the rock of autocratic rule that uses fundamentalism as an excuse and the hard place of an Islamic radicalism that the masses perceive as the only effective opposition.

There is certainly a danger that the Turkish government might be using the good will it has generated in many Western quarters—including the European Union—to finish off the defenders of the secular republic and clear the way for a future Islamization. To judge by his crushing victory and by the fact that the party founded by Ataturk has been reduced to a mere 21 percent of the vote, Erdogan’s adversaries have already been weakened.

So, should the world take the risk of trusting Erdogan? There does not seem to be a better option right now. The military is not a wise alternative and there are so many burning issues in Turkey—starting with the unresolved Kurdish question that could open up another front in the Iraq War—that any attempt to bring fundamentalists into the government would likely set the nation aflame. In fact, the European Union’s initial resistance against Turkey’s entry has probably strengthened Islam among many younger Turks tired of being ruled indirectly by a military establishment perceived as an ally of the West through NATO.

Every Western-backed authoritarian attempt at stemming fundamentalism in the Middle East has actually fueled radical Islam. Perhaps it’s time to give this moderate version a chance to prove itself. So far, it has worked through the republican system, embraced democracy and capitalism, and knocked at the doors of the West. That cannot possibly be to Osama bin Laden’s liking and it must make some of the Sunni despots in the region nervous.