Protesters hold up and a picture of slain opposition leader Mohamed Brahmi during an anti-government demonstration rallying for the dissolution of the Islamist-led government in Sfax, 170 miles southeast of Tunis, Sept. 26, 2013. (ANIS MILI/Reuters)

Tunisia’s governing Islamist party has agreed to resign in favor of a caretaker government in an attempt to resolve a political crisis that has paralyzed the country, a top union official said Saturday.

The assassination of a left-wing politician at the end of July — the second in five months — was the turning point for the country’s disgruntled opposition, which pulled its deputies out of parliament and staged a string of protests across the country.

The opposition also faulted the governing Ennahda Party for ignoring a rising trend of activism by Islamic radicals, some of whom attacked the U.S. Embassy in Tunis last year. But the government has since cracked down on these groups, throwing many of their members in jail.

Tunisia kicked off the Arab Spring by overthrowing its long-ruling autocratic leader, Zine el-Abidine Ben Ali, but its transition to democracy has been dogged by terrorist attacks, a struggling economy and widening divisions between Ennahda and the opposition.

After the second assassination, the Tunisian General Labor Union, the country’s main labor union, together with other members of civil society, mediated between the government and the opposition for two months in an effort to bring the transition back on track.

“It is a positive development for Ennahda, which has accepted the plan without reserve or conditions and which will clear the impasse,” Bouali Mbarki, the deputy head of the union, said Saturday.

Under the road map put forward by the negotiators, Prime Minister Ali Larayedh’s government will resign in three weeks as negotiations proceed on the selection of an apolitical figure to replace him, as well as the selection of an interim, nonpartisan government.

Meanwhile, the legislators boycotting the Assembly will return to work and finish the constitution over the next four weeks.

An election commission also will be set up to fix a date and organize presidential and legislative elections in the coming months.

With a military coup in Egypt and neighboring Libya awash in rival militias, Tunisia has been closely watched to see whether its post-Arab Spring transition can succeed.

Despite attacks by terrorists, the intensifying extremist trend and an often acrimonious political debate, Tunisia’s politics have generally been marked by compromise and concessions among factions.

— Associated Press