TUNIS (Reuters) - After Tunisia's Islamist party Ennahda conceded defeat in Sunday's parliamentary elections, there were no fireworks, concerts or cheering rallies outside the headquarters of its rival, the secular Nidaa Tounes alliance.
Instead it was Ennahda's leader Rached Ghannounchi who appeared before jubilant supporters to give what looked more like a victory address than a concession speech.
Ennahda's defeat was a blow to the first Islamist party to come to power after the Arab Spring revolts of 2011, and Ghannounchi may have been putting on a brave face after a loss attributed to his party's performance in government.
But Nidaa Tounes' subdued celebration says more about the complicated task the secularists face in forming a government with Islamists firmly entrenched in Tunisia's young democracy after the overthrow of the autocratic Zine El-Abidine Ben Ali.
Tunisia has avoided the chaos that has engulfed several of its neighbors following the Arab Spring, but it badly needs stability. Its democracy has progressed and it has a new constitution after a political crisis last year. But the North African state must still deal with tough economic reforms and growing Islamist militancy.
Nidaa Tounes, an alliance of former Ben Ali officials with trade unionists and smaller parties that formed an anti-Islamist front, cannot rule alone. But its choice of partners and how it deals with Ennahda may determine Tunisia's next steps.
Final results on Thursday show Nidaa Tounes won 85 seats in the 217-member assembly that will pick a new government against Ennahda's 69 seats. The liberal UPL movement won 16 while the leftist Popular Front party won 15 places.
Nidaa Tounes leader Beji Caid Essebsi faces a tricky balance. Allying with secular parties gets a majority, but excluding a powerful rival like Ennahda may undermine Tunisia's compromise-style politics and lead to deadlock.
With presidential elections next month -- Essebsi is a leading candidate -- getting too close to Ennahda also risks alienating voters who crossed the line to vote for Nidaa Tounes as a way to punish Islamists for their messy two years in power.
"Nidaa's options are limited," said Tunisian newspaper editor and columnist Zied Krichen. "An alliance with the smaller secular parties will be fragile and could fall apart at any moment. The second option is an alliance with Ennahda."
Nearly four years after the fall of Ben Ali, Tunisia is being praised as a model of transition, with political rivals overcoming differences over the role of Islam and the return of old regime officials to make democracy work.
Ennahda won the first post-Ben Ali free election to form a coalition government. But a crisis over the murder of two opposition leaders and the handling of Islamist extremists sparked a crisis that eventually forced it to step aside for a caretaker government.
Compromise has since become a byword for Tunisian politics after deal-making pulled the country out of that political confrontation, and allowed Tunisia to approve a new constitution praised as a model of inclusiveness.
Tunisia is not Egypt, where a strong military has long played a role in politics. Elected Islamist president Mohamed Mursi of the Muslim Brotherhood was toppled last year by the Egyptian army after mass protests.
Still, with such a narrow gap in parliament, forming a Tunisian government could take weeks of deal-making, and more negotiations before lawmakers select a new premier.
"We are not going to govern all alone," Essebsi said after the win. "But all of that will wait until after the presidential elections."
Debate has already begun within the party. Third-placed UPL and the liberal Afek Tounes may be best options for a coalition.
Popular Front, the leftist movement whose two leaders were assassinated last year, will be a tougher match ideologically with Nidaa Tounes, especially with the new government looking at economic austerity measures.
Ennahda was in a better position when it came to government after the first election, but they went into coalition with two smaller secular partners.
Nidaa's key question is how to handle Ennahda. Before the election Essebsi did not rule out some form of coalition with the Islamists, but party hardliners may object. Some Nidaa Tounes officials now talk of "cohabiting" with the Islamists.
"We are saying yes to living together. But the question now is how? Perhaps just in the parliament," said one senior Nidaa Tounes official. "We haven't decided whether our government will be partisan, a coalition or another technocrat government."
Born out of protests against Islamist rule, Nidaa became a home for opposition to what many secular Tunisians feared was Islamist threat to their country's liberal education and tradition of women's rights.
Debate about the role of Islam has eased since the approval of Tunisia's new constitution. But any move by Nidaa Tounes hardliners to exclude Ennahda could carry risks for its newly formed government, in parliament and on the streets.
"Ennahda's exclusion from the political process would be likely to deepen divisions between Islamists and secularists, which would lead to greater polarisation and encourage more radical Islamist groups to resort to violence," said Geoff Howard at Control Risks.
Ennahda Party officials acknowledge Sunday's vote was punishment for coming to power during a scrappy transitional period when the economy was struggling. But they were surprised by the poor performance of smaller opposition parties, whose votes went to Nidaa Tounes.
Ennahda has urged Nidaa Tounes to form a unity government to help finish Tunisia's transition. With nearly 70 seats in the new parliament, Ennahda could be a determined opposition in the legislature, and remains a well-organized party with a strong popular base.
"Political competition happens. We were in the lead, now we are second after three years," said Ali Larayedh, a former Ennahda's premier. "We are still the best guarantee for democracy and freedom."
The new Nidaa Tounes-led government may also be forced to compromise more by the tough agenda it faces. Tunisia's international lenders are demanding politically sensitive cuts to public subsidies to trim the deficit and measures to create more jobs, a key voter demand.
Eurasia Group analyst Riccardo Fabiani sees Nidaa Tounes seeking a secular coalition, but one that will be unstable and struggle with infighting over implementing reforms.
When Ennahda's government a year ago tried to impose a new vehicle tax, protests erupted in several regions, leaving one man dead and forcing the government to reverse its decision.
"If they want to rule without Ennahda it will be difficult," said a senior Ennahda official. "If they invite us we will look at that."
Editing by Giles Elgood