* Jomaa to govern technocrat cabinet until elections
* Compromise between Islamists, secularists seen as model
* Economic reforms, Islamist militancy key challenges (Adds more background;)
By Aziz El Yaakoubi
TUNIS, Jan 10 (Reuters) - Tunisia's new premier Mehdi Jomaa took office on Friday to lead a caretaker government until elections later this year after the ruling Islamist party's premier resigned in a deal to complete its steps to democracy.
Jomaa, a former industry minister, will head a non-partisan cabinet after compromise between the Islamists and secular opponents to end a crisis three years after Tunisia's uprising against autocrat Zine el-Abidine Ben Ali.
The small North African nation has edged closer to establishing full democracy since 2011 than other "Arab Spring" countries, especially Egypt whose Islamist president faces trial after he was ousted by the military.
"I am not a miracle worker, but I promise I will do my best we are doing everything possible to overcome hurdles, to reform what we can reform, and bring back stability," Jomaa told reporters in the presidential palace.
The former premier, Ali Larayedh, an Islamist who spent years in jail under Ben Ali, resigned on Thursday. Jomaa will name his cabinet over the next few days.
The new premier, who ran an aerospace parts business in Paris before he become minister, must tackle economic reforms sought by international lenders to curb the deficit and face a growing threat from Islamist militants tied to al Qaeda.
Police fired tear gas on Friday in the tourist city of Sousse to disperse dozens of ultra-conservative Islamist supporters of group hardline group Ansar al-Sharia, who tried to protest in the streets.
"They gathered after Friday prayers and tried to reach the central Sousse but police fired tear gas and dispersed them," a security source told Reuters.
One of the hardline Islamist movements to emerge after the 2011 revolt, Ansar al-Sharia in Tunisia was declared illegal last year after the government blamed it for killing two opposition politicians.
On Friday, the U.S. Department of State declared the group a foreign terrorist organisation tied to al Qaeda's North Africa affiliate. It was blamed for inciting the storming the U.S. embassy in Tunis a year ago.
COMPROMISE AND CHALLENGES
Since the political agreement reached late last year for a handover to a technocrat administration, Tunisia has edged closer to democracy. The national assembly is voting on the new constitution and a nine-member election commission has been appointed to over a vote later this year.
One of the most secular countries in the Arab world, Tunisia struggled with divisions over the role of Islam and the rise of militants since its uprising. But the assassination of the two opposition leaders last year triggered a crisis.
After months of negotiations, Ennahda agreed to resign once it had guarantees that the political parties would finish writing the new constitution, set a date for elections and appoint an electoral council to oversee the vote.
Political progress aside, many Tunisians are more worried about the high cost of living and some see little economic opportunity after the uprising that inspired revolts against long-standing autocrats in Egypt, Libya and Yemen.
Jomaa's government will have to tackle economic reforms to cut back its deficit -- especially the tough cuts in public subsidies that risk pushing up fuel and food prices and inflaming popular protests.
Police fired tear gas this week to break up protests in several cities over an increase on vehicle taxes, and Larayedh's government on Thursday suspended the reform.
Lenders such as the World Bank and the International Monetary Fund want Tunisia to reform public wages and subsidies to curb a deficit the government forecast at 6.8 percent of gross domestic product for last year.
The IMF has forecast the budget deficit for 2013 at 8.8 percent of GDP.
Tunisia said this week it expected it had done enough -- in its political transition and economic measures to control the deficit -- to ensure payment of a second $500 million tranche of its $1.5 billion IMF loan. (Writing by Patrick Markey; Editing by Tom Heneghan)