Premier-designate Ali Larayedh was set to unveil Tunisia's new coalition government on Friday after a deal was reached in last-minute talks aimed at ending a major political crisis.
"After marathon negotiations, we have reached an agreement on the government... we are going to give it the final touch tomorrow morning" before presenting the plan to the president, Larayedh said late on Thursday.
The announcement came after two weeks of fraught discussions, which three political parties finally pulled out of, amid ongoing tensions and uncertainty sparked by the assassination last month of a leftist politician.
Larayedh, the outgoing interior minister, was tapped on February 22 to head a new cabinet, with a deadline of midnight on Friday for him to present his team and government programme to President Moncef Marzouki.
The final round of talks began at 0800 GMT on Friday, with the new cabinet lineup to be presented to the president in the afternoon, according to his office.
Larayedh said the parties had reached an agreement on a political programme for the new government that would guide its priorities, policies and commitments.
The hopes of Larayedh and his ruling Islamist party Ennahda to form a broadly based coalition appeared compromised after the three political parties that had been asked to join announced Thursday they were withdrawing from the talks.
Consequently, only Ennahda and its secular allies in the previous government -- Marzouki's Congress for the Republic and Ettakatol -- actually took part in discussions about the composition of a new cabinet and a proposed government programme.
Ennahda, to which Larayedh also belongs, has made a key concession in accepting that key ministries, notably interior, foreign, justice and defence, be entrusted to independent candidates.
Tunisia has been mired in political crisis since leading leftist politician Chokri Belaid, a vocal critic of the Islamist-led government, was gunned down outside his home in Tunis on February 6.
Belaid's murder led to the resignation of prime minister Hamadi Jebali after he failed to forge a non-partisan government of technocrats when his ruling Ennahda party refused to support his efforts.
The scenario of continuing with the existing Islamist-dominated coalition was strongly criticised by opposition politicians on Thursday.
"Larayedh must tell the Tunisian people that he has failed to broaden the coalition, to achieve a real consensus, and he must resign," said Mahmoud Baroudi from the Democratic Alliance, one of the political groups to have quit the talks.
The sentiment was echoed by the Tunisian press, with French-language La Presse calling the tripartite coalition's failure to bring in new parties "an anomaly that adds to the already mixed record of the troika and Ennahda in particular."
Ennahda is deeply mistrusted by a large section of the secular opposition, which accuses it of authoritarian tendencies and of trying to bring about the Islamisation of Tunisian society.
If a cabinet is not named by 2300 GMT on Friday, Marzouki must choose another politician to form a government.
"Failure doesn't scare me because what is asked of me is to have a clear conscience and make the maximum effort. Everyone will have to take responsibility for the result," Larayedh told Mosaique FM radio.
After the president reviews the plan, the new government line-up must be approved by the National Constituent Assembly within three days.
In addition to the political upheaval, violence and attacks blamed on the ultra-conservative Muslim Salafist movement have rocked Tunisia in recent months.
The country has also been plagued by social unrest linked to unemployment and poverty -- key factors behind the mass uprising that toppled ex-dictator Zine El Abidine Ben Ali in January 2011 and touched off the Arab Spring.