It's like a conference of Kerenskys. I've come to Doha, Qatar, to a conference that brought Americans together with some of the leading moderates of the Arab world. These Muslims are democrats, activists and heroes. They've spent their lives promoting pluralism, championing elections and sometimes going to jail on behalf of the values we hold dear.

And their project, as they know, has been a failure. There is no mass support in the Arab world for the secular liberal democracies of their dreams. There are no giant rallies on their behalf, no prospects for their success. The urbane moderates at this conference are the short cut that failed.

So now these democrats face a choice: live with the corrupt regimes of the status quo or embrace the rising Islamist parties like Hamas.

Of the two, they prefer the Islamists. ''I've been dealing with autocrats my whole life. At least these ones are honest,'' says Saad Eddin Ibrahim, the Egyptian activist who recently served jail time for his efforts.

In the sessions, in the hallways, over meals, they fill your ears with their new convictions: The Hamas victory in Palestine was a step forward for democracy in the Middle East. Within a year, Hamas will have been transformed into a more moderate organization. The U.S. must now engage with Hamas.

Sure, the Arab moderates allow, the Islamists can sound radical, but so did Ariel Sharon once. There's already been a ''sea change,'' says Ziad Abu Amr, a Palestinian scholar who was recently elected to the Palestinian Legislative Council.

Not long ago the Islamists insisted that democracy was incompatible with their faith. Now they run in municipal and national elections. Now they have internal primaries to determine party direction. Now they enforce cease-fires and seek ''ways to achieve objectives other than violence,'' Amr says.

Soon they will even make agreements with Israel and, unlike Fatah, they will be disciplined enough to live up to them.

The reformers are betting their lives on Islamist moderation. ''We Arab democrats know if the Islamic victories turn out badly, we will be the ones they come after,'' Ibrahim says. ''Nevertheless, we are willing to take that risk. I am willing to take that risk.''

The Arab reformers are proud of the elections that were held in the Palestinian territories. And they have faith, now more than ever, in the democratic creed -- in the power of the democratic process to erode zealotry and encourage compromise.

It's said that America is trying to impose democracy on the Middle East, but at this conference the Arabs have more faith in democracy than the Americans do. It's the Americans who argue, politely, that beliefs, especially religious beliefs, are not malleable; that democracy does not quickly dissolve the granite of divinely inspired conviction. It's the Americans who point out that the leaders of Hamas are willing to die for their beliefs and that it is condescending not to take their beliefs seriously.

And indeed, the leaders of Hamas are open about their convictions, and they have nothing to do with embracing democracy or peace. ''The conflict with Israel is not a matter of land. It's a matter of ideology,'' one Hamas supporter told David Remnick of The New Yorker recently. ''The truth is on our side. The Israelis have the illusion that truth is on their side, but the Koran is the last revelation,'' said another.

Robert Satloff of the Washington Institute for Near East Policy reminded his reformer friends at this conference that Hamas may be tactically brilliant, but it has never compromised on principle. Hamas, Satloff warns, will take ''a difficult but resolvable national dispute and transform it into an irresolvable religious conflict.''

And so while the Arab democrats remain upbeat, the Americans are more likely to be grim-eyed. While the Arabs assume that in the Middle East there is always a big gap between what people say and what they believe, the Americans are more likely to take people at their word.

There is one old guy from a famous family in Egypt who doesn't fit either camp. He spoke in Arabic. He went on at embarrassing length, about the evils of homosexuality, about how the only proper meaning of democracy is obedience to God's law. Everybody looked uncomfortable as he droned on. He had unpolished conference manners.

But this great contest of creeds -- between democracy and orthodox Islam -- will be resolved in the breasts of people like him, territory neither the reformers nor the Americans really understand.