Tunisia's Prime Minister Hamadi Jebali resigned on Tuesday after failing to form a non-partisan government to end a political crisis exacerbated by the assassination of a senior opposition figure.
Jebali, who had warned of chaos if his plan fell through, made a last-ditch effort to push for "another solution" to the long-running crisis in a meeting with President Moncef Marzouki.
"I promised and assured that, in the event that my initiative failed, I would resign as head of the government, and that is what I have done," Jebali said on television.
Jebali, whose efforts to form a government of technocrats was rebuffed on Monday by his own ruling Islamist party Ennahda, said he was standing down to "fulfill a promise made to the people."
"This is a big disappointment," he said. "Our people are disillusioned by the political class. We must restore confidence.
"The failure of my initiative does not mean the failure of Tunisia or the failure of the revolution," he added, referring to the country's uprising two years ago to oust a long-time dictator Zine El Abidine Ben Ali.
The 63-year-old said he was convinced a non-political team "is the best way to save the country from wandering off track."
While other candidates might emerge to fill the job, it is possible Marzouki will ask Jebali to try again.
But Jebali said he would not sign on again with "any initiative that does not fix a date for new elections. What about the constitution? What about elections?"
As well as the row over the new government, there is deadlock over the drafting of a constitution, with parliament divided over the nature of Tunisia's future political system 15 months after it was elected.
The prospect of Jebali carrying on is "on the table, but we still have to discuss it, and there are several competent people in the event he refuses," said Ennahda parliamentary bloc chief Sahbi Attig.
Names being mentioned are those of Health Minister Abdelatif Mekki and Justice Minister Moureddine Bhiri.
Ennhada leader Rached Ghannouchi said on Facebook that he would meet Marzouki on Wednesday to discuss the party's candidate for the job.
Signup to our newsletter and follow us on Facebook and Twitter!
Jebali was left out on a limb on Monday after Ennahda rejected his proposals for a non-partisan government.
He first floated his initiative in the wake of public outrage over the killing in broad daylight of outspoken government critic Chokri Belaid by a gunman outside his Tunis home on February 6.
That enflamed simmering tensions between liberals and Islamists in the once proudly secular Muslim nation, with Belaid's family accusing Ennahda of his assassination, a charge the Islamists strongly deny.
Jebali admitted defeat in his plan, which he had hoped would be able to overcome the political divisions that have been blamed for igniting Salafist-led violence.
But he said "another form of government" was still a possibility.
And he insisted that, despite its failure, his initiative had at least succeeded in "getting everyone around a table" and in preventing Tunisia "from falling into the unknown."
His plans had been bitterly opposed by Ennahda hardliners, represented by Ghannouchi, who are refusing to give up key portfolios and insist on Ennahda's electoral legitimacy.
The Islamists control the interior, foreign and justice ministries and dominate the national assembly.
Ghannouchi said the representatives of some 15 parties had agreed on the need for a government with "political competences" and tasked with holding elections as soon as possible.
"We in Ennahda want to ensure that Jebali continues to chair (the cabinet), and so do all those who took part in this meeting," he told AFP.
Aziz Kirchen, representing Marzouki's Congress for the Republic (CPR), said an agreement had been reached for "the formation of a mixed government" of politicians and technocrats, but without giving details.
The political deadlock has left the country paralysed.
"Everything has stopped. The problem is that nobody thinks about the general interest but only of their special interests," a government official told AFP.
Since the revolution, Tunisia has also been rocked by violence blamed on radical Salafists, and ongoing social unrest over the government's failure to improve poor living conditions.