Tunisia's Islamist Ennahda party and its two coalition partners have reached agreement in principle to share out the top three government posts between them, senior sources from two coalition parties told Reuters on Friday.

Under the deal, the most powerful post, of prime minister, will go to Hamadi Jbeli, secretary-general of the Islamist Ennahda party which won last month's election, said the sources, speaking on condition of anonymity.

Moncef Marzouki, leader of the secularist Congress for the Republic, a junior coalition partner, is to be named Tunisian president, and Mustafa Ben Jaafar, leader of third coalition partner Ettakatol, will be speaker of the constitutional assembly, the sources said.

The three parties have an agreement in principle but it is not official yet, said one of the sources. The other source said an announcement would be made in the next few days.

Tunisia became the birth-place of the Arab Spring uprisings earlier this year after vegetable seller Mohamed Bouazizi set fire to himself in an act of protest that swelled into a revolution and ousted the president.

In its first democratic election last month, Tunisia handed victory to the moderate Ennahda party, the first time Islamists had won power in the Arab world since the Hamas faction won an election in the Palestinian Territories in 2006.

Tunisia's sometimes bumpy transition to democracy is being watched closely by Egypt and Libya, where Arab Spring revolts pushed out entrenched leaders and where once-outlawed Islamists are also challenging for power.

Last month's election was for an assembly which will sit for a year to draft a new constitution.

Once that is done, it will be dissolved and new elections will be called for a legislature and possibly a president, depending on what new system of government the assembly chooses.

There is no formal role for Ennahda leader Rachid Ghannouchi. Some observers say he may have his eye on the president's job when new elections come around.

Ennahda emerged from last month's election as the biggest party but short of a majority in the assembly, forcing it to form a coalition.

Ennahda coming to power has worried many Tunisian secularists who believe their liberal lifestyles are under threat.

Ghannouchi has offered assurances that he will not impose a Muslim moral code, that he will respect women's rights and not ban the sale of alcohol or try to stop women wearing bikinis on the country's Mediterranean beaches.

Some secularists said Ennahda's hidden agenda had been unmasked this week when footage emerged of Jbeli at a meeting with supporters invoking an Islamic state. But Ennahda said their opponents were deliberately distorting Jbeli's words.

(Writing by Christian Lowe; Editing by Matthew Jones)