Call them the new faces of the Islamic world. Malaysia's Prime Minister Abdullah Badawi, 65, and Turkey's Recep Tayyip Erdogan, 50, are two Muslim leaders who have set out to prove that Islamic societies can be tolerant, democratic and prosperous--and that they can co-operate, instead of clash, with more developed Western countries. The nations they lead may be on different sides of the world, but the two prime ministers share similar challenges as they attempt to define what it means to be a modern Muslim nation. First, they are searching for ways to transcend fundamentalist doctrines--or what Abdullah calls "extremists on both sides [who] will drive our civilizations apart." But both men are also finding that the real key to creating a functional Muslim society lies not in theorizing, but in the nuts and bolts of good governance--promoting economic and judicial reform, stamping out corruption, opening their economies to competition and investment. Their shared goal is to ensure that while Islam is a part of their nation's identity, it does not set the entire agenda.

In some respects, Erdogan and Abdullah are coming at the issue from opposite sides. Though Turkey is 99 percent Muslim, it's a nation where Islam has been tightly suppressed and controlled by an ultrasecularist state for the last 70 years. Erdogan's great revolution since his moderately Islamist Justice and Development Party swept to power in a landslide election victory in 2002 has been to persuade a skeptical Turkish state and politically powerful military to accept Islam as an element in mainstream politics. Though Erdogan hasn't (yet) challenged some of the most sacred shibboleths of Turkey's secularism--such as a blanket ban on wearing Islamic headscarves in schools, universities and government offices--he's the first Turkish leader in a generation to openly observe Ramadan and to attend mosque. In effect, says veteran political commentator Aydin Turgay, Erdogan is telling Turks that it's "not unpatriotic to be an observant Muslim."

Most importantly, Erdogan's dramatic reforms of freedom of speech, along with a systematic dismantling of the apparatus of Turkey's old police state, are moving Turkey ever closer to EU membership--signaling that it's OK to be a Muslim and a European, too. "Can Islam and democracy live together?" Erdogan asked rhetorically in a recent interview with NEWSWEEK. "Let those in the Middle East who are debating this question come to Turkey and see it work in practice."

Erdogan has conservative social views, which he says are an integral part of his faith. But that conservatism has invited controversy. In late September, on the eve of a crucial European Union report on the progress of Turkey's reforms, Erdogan attempted to introduce legislation making adultery a crime punishable by up to three years in jail. Surveys at the time showed that more than 70 percent of Turks backed the law--but the mostly liberal media, as well as Brussels, were horrified. Erdogan quickly backed down, but not before setting alarm bells ringing among secularists in the military and bureaucracy, who decried the planned adultery law as, in the words of an editorial in the nationalist Cumhurriyet newspaper, "a first step toward the introduction of Sharia." That's hyperbole, but with a grain of truth--while Erdogan has no intention of introducing Islamic law, he does want to edge Turkey toward an acceptance of its own Islamic identity. "We want to integrate with Europe, not assimilate," he says.

Abdullah's challenge is quite different from Erdogan's. Malaysia's Muslims make up only 58 percent of the population, with the rest Chinese, Indians and animist indigenous peoples. But a tide of religious fundamentalism among the country's conservative Muslims, fueled by radical Islamist movements in the region, threatens to upset Malaysia's delicate ethnic balance. Abdullah swept to power in general elections in March as the man who could heal that growing divide. An Islamic scholar by training, he scored his party's biggest majority since independence in 1957, including a wide endorsement from non-Muslims. Most importantly, his electoral victory rolled back previous gains made by the radical Islamic Party of Malaysia.

Since the election, Abdullah has tried to avoid confronting religious issues head-on. Instead, he's focused on economics and practical reforms--improving the police, enforcing the independence of the judiciary, balancing the budget. The key point of his strategy is to defuse the unholy alliance between poverty and fundamentalism which has afflicted so much of the Islamic world.

Abdullah and his family have been gently lobbying for reform in Malaysia's practice of Islam. The prime minister has formulated a 10-point set of reformist canonical principles that would lead to a progressive Islamic state. The most controversial calls for the protection of the rights of women--a reform supported by his wife, Endon Mahmood, and by his daughter Nori Abdullah. Endon has campaigned to promote monogamy in Muslim families in Malaysia (Muslim men are allowed to take as many as four wives). Daughter Nori belongs to a nongovernmental group called Sisters in Islam that has backed calls for legislation to criminalize rape within marriage.

Both Erdogan and Abdullah know that the best way to lead is by example. "Turkey will form a vacuum behind it as it moves forward," says Erdogan, arguing that progress in one country will stimulate reform in more backward countries in the region. Though neither Erdogan nor Abdullah is an Arab, both hope that their message of reform will penetrate from the periphery into the Middle Eastern heartlands of Islam. In the end, economic prosperity, democracy and stability will create a more modern and tolerant form of Islam in Turkey and Malaysia--and the progress in those countries could provide a strong incentive for their less-progressive neighbors one day to follow suit.