Consensus building and negotiation have been the paths to a successful transition to a parliamentary democracy, as Tunisia celebrates the inauguration of its first democratically elected president, Beji Caid Essebsi.

“It’s a step in the right direction. Political transitions are difficult and this one was peaceful and maintained a good pace,” says Maha Yahya, senior associate at the Carnegie Middle East Centre. “But they’re not out of the woods yet. Creating an open, democratic culture of debate doesn’t happen overnight.”

There are many positives to be taken from Tunisia’s experience of negotiating a new constitution and organising competitive elections. While Tunisia benefits from having a small, homogenous and well-educated population, willingness to compromise on the part of Islamists and old political elites has been vital to keeping the transition on track, despite ongoing bitterness. This contrasts with Egypt, where the Muslim Brotherhood overplayed its hand, refusing to compromise.

The mediation of a strong, active civil society also played an essential role, while the army kept out of politics.

“Participation in elections was high and there has been a huge leap in debate and political participation over the last few years,” says Micheal Willis, King Mohammed VI fellow in Moroccan and Mediterranean studies at Oxford University. “Ennahdha were quick to accept the election results and keep the democratic process on track.”

But democracy is never guaranteed, and the risk of a gradual slide back into soft authoritarianism remains. Instability on the Libyan and Algerian borders, frequently involving armed Islamists, could provide a pretext to crack down on dissent.

“Ennahdha resisted the temptation to repress the secular opposition during the transition, but [ruling party] Nidaa Tounes could try to exclude the Islamists,” says Willis. “Tunisia’s democratic institutions are not very robust and it will take time to stabilise a political system of alternating power and build trust.”

Although the Tunisian press is positive about the successful election period and the end of the transitional power vacuum, the challenges facing Essebsi are enormous.

Economic growth plummeted following the revolution, and has only returned to 3 per cent, well below the rates necessary to provide jobs for Tunisia’s growing population. The tourism sector, which contributes 7 per cent of GDP and is a vital source of foreign exchange earnings, suffered heavily. The government is already running a deficit of 6.7 per cent and debt reached 50.9 per cent of GDP in 2014.

The transitional government did not have the legitimacy to undertake long-term economic reforms and deregulation, so the issue is growing ever more urgent.

But Nidaa Tounes is dominated by prominent figures from the old regime, such as 88-year-old Essebsi. This reduces the prospect of reforms that will dismantle the crony capitalism that caused economic stagnation in the Ben Ali era.

“Networks of corruption never went away,” says Yahya, “But it is better to have them out in the open, so conversations about conflicts of interest can take place.”

The new government needs to act urgently to reintegrate disillusioned youth into economic and political life. If it fails, there is a risk of a return to popular unrest, especially in the deprived interior, which predominantly supports Ennahdha.

“They will need to address some key popular concerns: creating graduate jobs; improving living standards; and providing stability,” says Yahya. “And the youth in general are disillusioned and excluded from political decision-making. The future depends on how the new political elite chooses to engage with them.”

A lot now rests on decisions Nidaa Tounes and other political parties, allied and opposition, will have to make soon. Many believe that creating consensus is in Tunisia’s best interests. The most important factor will be the composition of the new cabinet, currently the object of a power struggle, and the action plan they develop.

“Ordinary people suffered from the chaotic transition and supported Nidaa Tounes for stability,” says Willis. “The main parties agree on the need for reform and deregulation, but many members of Essebsi’s entourage continue to benefit from crony capitalism and will protect their interests.”