TUNIS Tunisia's Islamist Prime Minister Ali Larayedh resigned on Thursday to make way for a caretaker government in an agreement with secular opponents to complete the country's transition to democracy.
Three years after its uprising against autocrat Zine el-Abidine Ben Ali, Tunisia is in the final stages of establishing a full democracy before new elections that would be a rare bright spot in an unstable region.
Tunisia's new premier, technocrat Mehdi Jomaa, must tackle subsidy cuts sought by international lenders to curb the small North African country's deficit and also confront a growing threat from Islamist militants.
Illustrating the continued fragility, troops in the southern city of Tatouine fired into the air and police used tear gas on Thursday to disperse protests over economic hardship.
To end months of political crisis, Larayedh's moderate Islamist party Ennahda agreed late last year to a deal to hand over to an independent cabinet led by Jomaa, who will govern until the election.
"I have just handed my resignation to the president," Larayedh told reporters. "The president will appoint the new prime minister, Mehdi Jomaa, shortly and he will present his new cabinet in the next few days."
One of the most secular countries in the Arab world, Tunisia has struggled with divisions over the role of Islam and the rise of Islamist radicals since the uprising in 2011 that inspired other revolts in the region.
Tunisia's largely peaceful transition has been widely watched as a model for other nations struggling with instability since their own "Arab Spring" revolts.
But the killings of two secular Tunisian opposition leaders by gunmen last year galvanized Ennahda's secular foes, who took to the streets to demand the government resign, accusing it of being too lax with hardliners.
After months of wrangling, Ennahda reached a compromise with the main opposition Nidaa Tounes and its allies to resign once parties had finished a new constitution, set a date for fresh elections and appointed a body to oversee the vote.
Much of that agreement has now been implemented. 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.
International lenders want Tunisia to trim public subsidies to cut a budget deficit estimated to have hit 6.8 percent of national output last year. But the cuts will raise fuel and food costs and may spark further discontent among Tunisians.
The IMF has still to disperse a $500 million portion from a $1.5 billion loan for Tunisia.
After two days of protests and strikes backed by labor unions in several cities over a hike in vehicle taxes, Larayedh said on Thursday the government would suspend the reform.
Troops and police intervened to repel hundreds of protesters in Tatouine after they attacked two police stations and an Ennahda party office, the state news agency TAP said.
No injuries were reported and local residents said the army had brought the situation under control later in the day.
Authorities say Islamist militants from the Ansar al-Sharia group, whose leader pays allegiance to al Qaeda, are also a growing menace for a country heavily reliant on foreign tourism.
A suicide bomber blew himself up at a popular beach resort late last year - Tunisia's first such attack in a decade.
Islamist parties who rose to political power after the 2011 revolts in Egypt and Libya have fared less well than Ennahda, whose compromise with secular opponents will allow them to again take part in elections this year.
Egypt's democratically elected President Mohamed Morsi faces trial after the military ousted him and Libya's Muslim Brotherhood-allied party is locked in a political crisis with its secular foes in the country's parliament.
(Editing by Gareth Jones)