The misnamed Arab Spring has devolved into two societal conflicts that will determine whether the Middle East is able to join the liberalizing and globalizing world of the 21st century. One is the sectarian struggle between Sunnis and Shiites, with its bloody epicenter in Syria. If it is not soon settled, it may prevent the emergence of a new order there and in Iraq, Lebanon and Bahrain for years — or even decades.

The other is less violent, but arguably more urgent: the battle for power among political Islamists and secularists in predominantly Sunni states such as Egypt, Tunisia and Libya, as well as in Turkey. The question there is much the same as in the sectarian fight: Can the two sides agree to tolerate the existence of each other and create a democratic political system that reconciles their competing values?

So far, it’s not looking good. Rather than building a consensus, secular and Islamist forces in Egypt have polarized, with extremes growing on both sides. In Turkey, the last 10 days have shown a similar divide between the urban middle class and an Islamist government that, while far from extremist, is decreasingly tolerant. Like Egyptian President Mohamed Morsi, Turkish leader Recep Tayyip Erdogan subscribes to a crude theory of democracy, according to which the winner of elections is entitled to impose his agenda — and sweep aside journalists, judges and minorities who may stand in the way.

Can anyone in the Middle East show a workable way forward? Perhaps not. But I was encouraged by two conversations I had in recent days with leaders of Tunisia’s ruling Ennadha movement, founder Rachid Ghannouchi and former prime minister Hamadi Jebali. While neither could be confused with Thomas Jefferson, both appear to grasp some of the essential principles that the post-revolution Arab political movements — and in particular the Islamists — must internalize.

Ghannouchi, a white-haired 72-year-old who spent most of his adult life in exile or prison, may be the boldest and most progressive thinker among Islamists in power. He goes so far as to compare the history of Muslim countries to Europe in the Middle Ages. “We also have spent five to six hundred years in darkness, where the capacity for reason has stopped,” he said. This “heritage of decadence,” he said, has created an orthodoxy in which “punishment is the main part of sharia.”

“This is the main problem: To convince people that sharia should be about justice, human rights, equality and the spreading of peace,” he went on. “I think that we have in Tunisia an opportunity to promote an image of an Islam that is married with the main values of our time. The real values of modernity — of science and universal values — cannot contradict with our Islam.”

What does that mean in practice? Both Ghannouchi and Jebali said the starting point for the Ennadha party was a renunciation of the majoritarian dogma of Morsi and Erdogan. “We have to move from the framework of the majority of party to that of the majority of society,” said Jebali, a likely candidate for president in Tunisia’s next election. “This should be the practice for the next five to 10 years. When we reach the maturity of the United States we can adopt the principle of the 51 percent.”

The two men boasted about concessions Ennadha has made in the prolonged negotiations over Tunisia’s new constitution, including the exclusion of sharia and the inclusion of a provision on freedom of conscience. Now in its fourth draft, the constitution remains unacceptable to many secularists and human rights groups: Among other things, vague language appears to open the way for controls on free assembly and the media. Ennadha has, however, refrained from Morsi’s tactic of ramming a final version through without secular support — even though the process is months behind schedule.

“Two-thirds supported the Egyptian constitution, but the other third didn’t see themselves in it,” said Ghannouchi. “That is not what we want.”

For the moment, Ennadha’s biggest problem is not secularists, but radical Islamists. After tolerating the extremist Ansar al-Sharia movement for too long, the government finally banned its annual assembly last month, leading to street clashes. Meanwhile, the army is fighting al Qaeda-linked jihadists who have taken refuge in the western mountains with weapons smuggled from Libya.

The turbulence raises the question of whether Ennadha can meet its declared goal of reaching agreement on a new constitution, ratifying it via a referendum and holding new elections by the end of this year. If it can, the party just might achieve Ghannouchi’s goal: “We want to offer a model for all Arabs on how to combine democratic values and Islamic values.”

Read more from Jackson Diehl’s archive, follow him on Twitter or subscribe to his updates on Facebook.