A Tunisian woman casts her ballot paper during the Tunisian parliamentary elections at a polling station in Tunis in October 2014. (MOHAMED MESSARA/EPA)

The fragile process of building democracy in Tunisia has brought extraordinary changes. Some of the main opposition parties of the past have almost entirely disappeared. A consensual democracy has emerged, but it is built on the return of the former political and economic elite. Despite the political successes, the transition is now facing security challenges and serious economic discontent. Now, in a congress over the weekend, the Ennahda movement has formally stepped away from the Islamism of its past to divide itself into a civil political party and a separate religious movement.

Ennahda shaped this uneven process of democratization and — in turn — has been shaped by it. The movement has changed from a religious opposition movement that once staged months of mass demonstrations against the Zine El Abidine Ben Ali regime, into a political party that pursues a consensus-seeking agenda. From now on, Ennahda will be divided into a political party that draws on an Islamic reference but is no longer formally “Islamist,” and a separate religious, social and cultural movement.

Ennahda’s ambitions were once much more radical. When it first announced its political project in 1981, it talked about siding with the “oppressed.” It aspired to compete in elections while simultaneously forging a dissident subculture built around identity, morality and dawa, the call to Islam. After years of exclusion and repression, the movement eventually moved to confrontation in 1990, after its leaders were jailed in sweeping arrests following its successes in elections a year earlier. It staged months of demonstrations and protests, before being dismantled in a final clampdown.

Two decades later, after the 2011 uprisings, Ennahda again took a populist tone: It called for the prosecution of security forces responsible for killing demonstrators, demanded reform of the political police and called for a final break with the former regime.

But under pressure for its failures in government from 2011 to 2014, the movement shifted strategy. It diluted its Islamising ambition in drafting the constitution and reversed an earlier commitment to exclude former senior figures from Ben Ali’s party from political life, the Democratic Constitutional Rally.

After losing the second elections in October 2014, the Ennahda leadership pushed hard for a minor role in a coalition with its rival Nidaa Tounes, a new party largely representing the political and economic elite of the old era. It voted in favor of a new anti-terrorism law that was harsher in parts than that of Ben Ali, and it backed an unpopular draft bill that would amnesty those businessmen accused of financial crimes. This was, Ennahda said, a “strategy of consensus” that was required for the greater cause of a successful democratic transition.

How can we explain this shift? The most common explanation is that Ennahda was simply acting pragmatically. Even if it had really wanted to apply sharia law or to take a more confrontational stance against the former regime elites, the reality of transition politics instead required compromise. After all, Ennahda’s defeat in the October 2014 elections showed it couldn’t win repeated victories at the ballot box. Perhaps there was more to be gained by settling for a second-best outcome in uncertain times, especially in a system in which proportional representation and a mixed parliamentary-presidential model meant that coalition governments were more likely than a two-party system. But this implies that the movement’s adaptation was merely presentational and only the result of the political upheavals of the past few years.

A better way to think of Ennahda’s shift in strategy is to ask what lessons the movement drew from its own history. Most important is the way the movement has learned from its experience in the elections of April 1989, during a brief moment of political opening at the start of the Ben Ali regime. Despite running only as independents in a rigged election, Ennahda candidates won about 15 percent of the vote nationwide, and up to 30 percent in some cities, including Tunis, Sousse, Monastir and Bizerte. But they won no seats in parliament, and instead, an intense confrontation developed between the movement and the regime, with mass street demonstrations and a widespread campaign of arrests. This led to a severe repression and the dismantling of the movement.

In jail and in exile, the movement went through a process of evaluation. It admitted that its political ambition had overwhelmed its original cultural and social Islamising project. It accepted that it had failed to build alliances with other opposition parties and that occasional acts of violence had undermined its position. Different trends learned different lessons.

Leaders in exile began to propose reconciliation with the Ben Ali regime, to the frustration of those thousands of Nahdawis languishing in Tunisian prisons. Interviews with Nahdawi leaders since 2011 suggest that the fear of a return to repression remains a powerful motivational force even now. They saw inclusion in coalition government — whatever compromises and costs that might entail — as the strongest protection against the risk of a return to repression.

But others, including some of those who had been in prison, drew different lessons, and in the 2000s, they began to work with non-Islamists in human rights associations or in other opposition parties to challenge the authoritarian regime. Many other ex-prisoners, of course, stayed away from all political and civil society activity altogether because of the punishing weight of repression and social exclusion. For them, the lesson of the confrontation had been that the political ambitions of their leaders had destroyed the years of working to build an Islamist subculture in society. These different lessons go some way to explaining the party-movement split in Ennahda today.

The third explanation for this strategic shift is that it represents a more profound but inconclusive intellectual adaptation. The division into party and movement is not merely a functional separation but an attempt to rethink what it means to be an Islamist movement that competes within a democratic system. This has been under discussion inside the movement for several years, starting well before the 2011 uprising, but it was always contested.

In the final stages of constitution drafting in January 2014, several Ennahda deputies tried in vain to reinsert mention of religious law as a source of legislation or to exclude a guarantee to freedom of conscience. The party’s political vision remains ambiguous. Often, Ennahda has returned to a familiar position of defending or acting as guardian over the Islamic tradition that it regards as authentic to the Tunisian experience. Its strategy of consensus means not just forging pragmatic political alliances but also conceiving of Tunisian society as one homogeneous community with one authentic identity.

The leadership of Ennahda has drawn from its past a sense of the need for caution and inclusion. As a result, the new priority given to a consensus-seeking political strategy is part strategic adaptation, part intellectual shift. However, Ennahda’s leaders are still to convince all of the movement or its political rivals of the value of their new approach.

Rory McCarthy is a doctoral candidate in oriental studies at the University of Oxford and a former Middle East correspondent for the Guardian.