Hamadi Jebali had been trying to form a new coalition in response to the political crisis sparked by the killing of opposition leader Chokri Belaid.
He had said he would quit if his Islamist Ennahda party did not back his plan for a cabinet of technocrats.
Chokri Belaid’s assassination on 6 February provoked mass protests and resignations from Tunisia’s coalition government.
“I vowed that if my initiative did not succeed, I would resign and I have done so,” Hamadi Jebali told a news conference after meeting President Moncef Marzouki.
Describing his step as “a big disappointment”, he said he was standing down to “fulfill a promise made to the people.”
“Our people are disillusioned by the political class. We must restore confidence,” he stressed.
And he added: “The failure of my initiative does not mean the failure of Tunisia or the failure of the revolution,” in a reference to the popular unrest two years ago that ousted autocratic leader Zine al-Abidine Ben Ali.
Hamadi Jebali’s resignation comes despite comments by Ennahda’s leader Rached Ghannouchi on Monday that all parties involved in the coalition building talks had wanted the prime minister to remain in office.
Opposition supporters have blamed Ennahda for Mr Belaid’s assassination – an accusation the party denies.
Chokri Belaid’s killing was the first political assassination in Tunisia since the Arab Spring uprising in 2011.
oY_5ISn75WMImage source: Wikimedia Commons President-elect Donald Trump celebrated his election victory at the Ultimate Fighting…
Millions of voters across the US chose to return Donald Trump to the White House…
Donald Trump declares victory in the US election as he addresses jubilant supporters in Florida.…
Stocks around the world are rising as Donald Trump appears to be on the cusp…
Donald Trump has won Pennsylvania, North Carolina and Georgia and taken a lead over Kamala…
Quincy Jones, the celebrated musician and producer who worked with Michael Jackson, Frank Sinatra, Ray…