By Patrick Markey and Tarek Amara
TUNIS (Reuters) - Tunisia's ruling Islamists began talks with secular opponents on Saturday under a deal that calls for their government to step down and prepare elections to end months of political deadlock.
The North African country, where an uprising two years ago began the "Arab Spring" revolts, has been in crisis since the July assassination of an opposition leader triggered street protests demanding the government's resignation.
Tunisia's path to democracy has been relatively peaceful compared to those of its neighbors, Egypt, whose army ousted an elected Islamist president, and Libya where a weak government is struggling to tame rival militias.
The talks are still delicate, but moderate Islamist party Ennahda has agreed the government will step down at the end of three weeks of talks to decide on a temporary caretaker administration and set a date for presidential and parliamentary elections.
Leaders from Ennahda and an alliance of opposition parties signed a formal agreement on negotiations on Saturday at a ceremony at the Palais de Congres in central Tunis.
"It's a fragile balance now. We have to work to find a consensus," said Maya Jibri, a leader of a secular opposition party at the ceremony.
The three-week countdown will begin when the detailed negotiations start early next week. The agreement also calls for a special assembly drafting a new constitution to finish its work in a month.
Tunisia's unrest erupted in July after a second assassination of an opposition leader by suspected Islamist militants threatened to scuttle a transition once seen as a model for the region's young democracies.
After autocrat Zine al-Abidine Ben Ali was ousted by street protests against his rule in 2011, divisions over the political role of Islam have split one of the most secular nations in the Muslim world.
Once suppressed by Ben Ali, hardline Islamists have grown in influence and have often demanded a greater role for religion in public life.
Government critics fear moderate Ennahda wants to impose a strict Islamist program that would impinge on liberal education and women's rights in a country with strong ties to Europe and a heavy reliance on Western tourism.
Tunisia's former colonial ruler France welcomed the dialogue, hoping the parties would "finalize the political transition with the adoption of a new constitution as well as free and democratic elections."
MORE WRANGLING ON WAY?
But the two sides are still divided over key issues including the date of the elections, the role of the special assembly finishing the draft constitution and the composition of an electoral body to oversee the vote.
"There are still a lot of obstacles," said Zuhair Hamdi, a member of the slain politician's party. "Really there is little trust in Ennahda."
Should they reach a deal on the new government, most potential candidates to run the transition until elections are technocrats with backgrounds in economics and likely to be consensus figures for Islamists and secular parties.
After winning 40 percent of seats in the assembly to write the new constitution, Ennahda took office with two secular junior partners in a transitional government meant to stay in power until the constitution was finished.
Its critics accuse it of mismanaging the economy and failing to be tough enough on hardline Islamists, but it remains the country's most organized political party.
Tunisia's international lenders already fear continued political stalemate will damage the government's ability to carry out reforms and reduce its budget deficit.
More wrangling is likely after Islamists were forced to accept a road map less than ideal for them, with a precise timetable for the resignation of their government, said Riccardo Fabiani, an analyst with Eurasia Group.
"The bottom line is - a compromise is within reach, now more than ever," he said. "But delays to the timetable and political posturing from the parties are to be expected."
(Additional reporting by Ingrid Melander in Paris; editing by Tom Pfeiffer)