"I have just handed my resignation to the president," Larayedh told reporters on Thursday. "The president will appoint the new Prime Minister Mehdi Jomaa shortly, and he will present his new cabinet in the next few days."
Larayedh's party al-Nahda agreed late last year to the deal which called for its government to hand over to a non-partisan cabinet led by Mehdi Jomaa, a technocrat who will govern until the elections.
Three years after an uprising against former dictator Zine el-Abidine Ben Ali, Tunisia is in the final stages of establishing a fully functioning democracy before elections.
Illustrating the country's continued fragility, troops in the city of Tatouine fired into the air and police used tear gas earlier on Thursday against protesters demonstrating over economic conditions, the state news agency said.
Tunisia's transition has been mostly peaceful since 2011. But the killings of two secular opposition leaders by gunmen last year galvanized al-Nahda's secular opponents who took to the streets to demand its members resign from power, accusing them of being too lax with hardliners.
After weeks of wrangling, al-Nahda reached a compromise with main opposition party Nidaa Tounes to resign once parties had finished writing the new constitution, set a date for elections and appointed an electoral council to oversee the vote.
Much of that agreement has been done: The national assembly is voting on the last clauses of the new charter this week and on Wednesday night the assembly appointed a nine-member electoral commission.
But Tunisia's new government will have to tackle economic reforms to cut back its deficit while managing simmering popular discontent over the high living costs and lack of economic opportunities since the revolution.
After two days of protests in several cities over an increase on vehicle taxes, Larayedh said earlier on Thursday the government would suspend the tax reform.
NTJ/BA