Western observers may fear political parties with Islamist roots, but Turkey’s is committed to legal reform, EU membership and economic growth.

Western observers tend to regard the political success of Islamists in the Middle East as bad news, because elections have brought to power such dangerous hard-liners as Iranian President Mahmoud Ahmadinejad and Hamas leader Ismail Haniyeh. Yet the strong victory of the main Islamist party in Sunday's election in Turkey -- the world's prime laboratory for an experiment in whether Islam is compatible with democracy -- was a very hopeful development.

The ruling Justice and Development Party, known in Turkey as the AKP, won a thumping 47% of the vote in the parliamentary contest. It was a repudiation of the secular establishment that ruled Turkey off and on for decades after being put in place by Kemal Ataturk in 1923. This elite, which runs the judiciary and the military, threatened to undermine the country's democracy in April, when army leaders hinted that they would stage a coup if an AKP candidate whose wife wears a head scarf were elevated to the presidency.

In Turkey it's the Islamists, or at least the liberal Islamists who head the AKP, who promote religious freedom and tolerance, while secularists' fears of a religious takeover of government institutions have prompted hysteria over matters as seemingly harmless as a scarf. The AKP's popularity is soaring because of measures that have tamed inflation and led to strong economic growth in just six years, and its support of Turkish efforts to become a member of the European Union has produced progressive legal reforms. Meanwhile, the nationalistic Republican People's Party, the party of Ataturk, opposes EU membership and favors military intervention in Iraq to discourage attacks from Kurdish separatists.

It's still unclear whether Turkey's version of tolerant and moderate Islamic rule will spread to other Muslim countries, or even survive for long in Turkey. But at this point, it's a beacon for struggling democracies in places such as Iraq and Afghanistan, which is why it's in the overwhelming interest of the United States and Europe to support the newly strengthened regime of Prime Minister Recep Tayyip Erdogan. For the U.S., that means a renewed push to resolve the Kurdish problem diplomatically. For the EU, it means fighting to keep Turkey's membership drive alive.