IN A region gripped by jihadist violence, civil war and the return of authoritarian rule, Tunisia’s parliamentary election on October 26th was an exception on many counts. Alone among the countries that saw popular revolts in the “Arab Spring” of 2011, it has remained on a path to democracy. Seemingly against the trend of Arab politics, voters inflicted a firm rebuke on Islamists and instead gave victory to the secularist coalition known as Nidaa Tounes. And the defeated Islamists of the Nahda party bowed peacefully before the verdict. A stint out of power, said its leader, Rached Ghannouchi, could be salutary.

Nidaa Tounes (“Tunisian Call”) won 85 of the 217 seats in parliament, against 69 for Nahda (“Awakening”). Nahda can still count on loyalists nationwide and has an organisational reach that is envied by other parties. Nevertheless, voters have been unimpressed by the Islamists’ two years at the helm of government, in 2012–13, particularly its inability to pull the economy out of stagnation and its failure to quash the emergence of violent jihadism. Senior Nahda figures concede that the job of running the country proved to be harder than they had expected.

Though often fractious and tainted by the presence of members of the ancien régime of Zine el-Abidine Ben Ali, the ex-president overthrown by a revolt in January 2011, Nidaa Tounes was helped to victory by the popularity of its leader, Beji Caid Sebsi. Three times a minister, he emerged from retirement in 2011 as a reassuring figure and headed the interim government that handed over to the Nahda-led coalition at the end of that year. Rattled by the army coup that deposed Egypt’s Islamist president, Nahda handed power to a technocratic government in January, after two political assassinations raised tensions. It also softened the Islamist flavour of the proposed new constitution.

Nahda would like to join a coalition under Nidaa Tounes, which has not yet made its intentions clear. The secularists could put together a government with smaller factions, albeit a rather fragile one. Moreover, opposition to Islamists is part of the raison d’être of Nidaa Tounes. The party accuses the former Nahda-led government of having undermined the separation of religion and state that was laid down by Habib Bourguiba, Tunisia’s first post-independence president. Some admire the Egyptian army’s suppression of Islamists.

Beyond the economy and the balance between secularism and Islam, security has been an important issue. Many Tunisians reckon that the Nahda-led coalition government was culpably slow in responding to the spread of jihadist ideology in mosques after the fall of Mr Ben Ali. Just days before the election, a shoot-out with alleged jihadists left one policemen and six others dead (five women among them). The presence of armed national guardsmen and soldiers outside polling stations made for a more sombre mood than the celebratory post-revolutionary election three years ago.

Nidaa Tounes still struggles to shake off claims that it represents an attempt by members of the previous ruling party, the Constitutional Democratic Rally (RCD), to regain influence. In what was in effect a single-party state, the RCD built clientelistic relations running from taxi-drivers to corner-shop owners, lawyers, senior civil servants and—importantly for its funding—business people. Although the RCD as an organisation is long dead, these networks may have played a role on polling day.

A government is unlikely to be formed before Tunisians return to the polls to elect a new president on November 23rd. The new constitution passed in January gives more powers to the prime minister and parliament, now produced by genuine elections, rather than the president. Given that Mr Caid Sebsi, 88 next month, is the front-runner to get the job (Nahda is not fielding a candidate), it is still unclear who will become prime minister.

One possibility would be to ask the popular outgoing technocrat, Mehdi Jomaa, to form another government. He has not entirely ruled out the prospect.