Tunisia's political rivals have agreed on a timetable for the Islamist-led ruling coalition to quit and be replaced by a government of independents.

The Islamist Ennahda party and opposition groups in the country signed a roadmap aimed at creating a new government within three weeks.

Saturday's deal, signed in the presence of politicians and media, was brokered to end a simmering two-month crisis sparked by the assassination in July of opposition MP Mohamed Brahmi.

The document, drawn up by four mediators, foresees the nomination of an independent prime minister by the end of next week, who would then have two weeks to form a cabinet.

It says that after the first day of national dialogue, "the government will resign with a delay not exceeding three weeks".

Abdelhamid Jlassi, one of the leaders of Ennahda, , told AFP news agency the national dialogue is not expected to start on Monday, however.

"First there will be preparatory meetings, and the date of the government's resignation will not be determined until the start of the real national dialogue," he said.

"Ennahda's signature today is a major concession made in the interests of the country," he added.

By signing the roadmap, the Ennahda-led coalition, which has been rocked by the murder of two political opponents, economic woes and prolonged political disputes, has agreed to step down two years after winning a general election.

Its victory at the polls on October 23, 2011, was the first free vote in Tunisian history, and followed the overthrow of long-ruling strongman Zine El Abidine Ben Ali in the first revolt of the Arab Spring.

The roadmap also foresees, within the next four weeks and after a national dialogue across the political spectrum, the adoption of a constitution and a timetable for elections.

Mistrust

"I want to thank you for joining this dialogue because you are opening the door of hope for Tunisians," said Houcine Abassi, whose UGTT trade union confederation was the lead mediator behind the roadmap, at Saturday's ceremony.

Delegates at the Palais des Congres said the launch of the hard-won dialogue with a symbolic ceremony had earlier been jeopardised by a last-minute dispute.

The UGTT said Ennahda had initially refused to formally sign the text that underlines the timetable of the national dialogue.

The two sides are still divided over issues including the date of elections, the role of a special assembly finishing a draft of a new constitution and composition of an electoral body to oversee the vote.