TUNIS (Reuters) - Tunisia’s Islamist party Ennahda will separate its political and religious work, its chief said on Friday, moving away from its tradition of political Islam.

Rached Ghannouchi, leader of the Islamist Ennahda movement, arrives surrounded by bodyguards at the National Conference on Employment in Tunis, Tunisia, March 29, 2016. REUTERS/Zoubeir Souissi

Ennahda was the first Islamist party to come to power in the wake of the 2011 Arab Spring revolutions and it took part in the first government coalition after the overthrow of Tunisia’s autocratic leader Zine El-Abidine Ben Ali.

It won the first post-uprising election by appealing to many Tunisians who saw its Islamist identity as an antidote to the years of corruption and repression under the Ben Ali government in one of the region’s most secular nations.

Free elections, a new constitution and a compromise politics between secular and Islamist parties have helped Tunisia avoid the turmoil seen in several other Arab nations.

“Ennahda has changed from an ideological movement engaged in the struggle for identity, to a protest movement against the authoritarian regime, and now to a national democratic party,” Ghannouchi told supporters at a rally. “We must keep religion far from political struggles.”

Analysts said Ennahda’s reform appeared to try to distinguish itself in a region where political Islam has suffered setbacks, and also to prepare for local elections next year and presidential run in 2019.

Unlike the Muslim Brotherhood in Egypt that was toppled by the Egyptian army in 2013 and isolated from political activity, Ennahda was able to survive despite initial conflict with secularists with whom it eventually shared power.

“Ennahda benefited and learned from the regional changes after the Muslim Brotherhood in Egypt, and understood well that there was no future in political Islam,” analyst Jamel Arfaoui said.

“Ennahda succeeded in shaping a new image for Islamists abroad, but the question remains will it be able to persuade people locally that it has changed.”

Ennahda, formed as a movement during the Ben Ali years and with many of its leaders imprisoned or exiled during that time, has in the past struggled with internal splits between its more moderate and conservative wings.

A crisis over the murder of two opposition leaders and Ennahda’s handling of hardline conservative salafist groups eventually forced the party to step aside during its first government for a caretaker administration in 2014.

Since then, Ennahda and secularists have made compromise a byword for Tunisian politics after their deal-making pulled the country out of that political confrontation, and allowed Tunisia to approve the new constitution.

Tunisia President Beji Caid Essesbi welcomed the step to separate politics and religious activities, saying that Ennahda was heading in the right direction. He said the next test for Ennahda will be local elections in March 2017.

“The state now respects religion and religious freedoms, contrary to the way it was in the past,” he said. “Political movements should be directed toward political competition and serve the people only.”