THERE is only one happy story to emerge from the tumult of the Arab spring of 2011. While its neighbours succumbed to chaos, violence and renewed authoritarianism, Tunisia, the first Arab country to oust its dictator, remained on the path to peaceful democracy. There were setbacks along the way, but in 2014 the country held free and fair general and presidential elections, and adopted a relatively liberal constitution. Its reward was the Nobel peace prize, presented in October to four civil-society organisations that helped keep Tunisia on track.

The prize, said the Nobel committee, was also an encouragement for Tunisia to stay the course. But a month later, the country looks rather wobbly. A rift in the dominant political party threatens to destabilise the government, which was already struggling to jump-start an economy plagued by corruption, red tape and two big attacks on foreign tourists claimed by Islamic State this year. Neighbouring Libya, mired in civil war, may have provided the training ground for those terrorist strikes. The Tunisian army, meanwhile, is fighting Islamist militants on its border with Algeria.

Another big attack was foiled this month, according to Tunisian authorities. A cell of 17 Islamist militants, trained in Libya and Syria, planned to hit hotels, security forces and politicians in Sousse, where 38 foreigners were killed in one of the earlier terrorist strikes. Kalashnikov rifles and explosives were found when the suspects were arrested, says the interior ministry.

The security threat adds to pressure on Nidaa Tounes, the party with the most seats in parliament, to resolve a long-simmering power struggle between rival factions. One wing, led by Mohsen Marzouk, the party’s secretary-general, believes Hafedh Caid Essebsi, who leads the other wing, is trying to create a family dynasty. His father, Beji, is Tunisia’s president and the founder of the party. The dispute came to a head on November 8th, when 32 MPs, seen as supportive of Mr Marzouk, resigned from Nidaa Tounes. The group represents over a third of the party’s parliamentarians.

It now looks like the dissident MPs may return to the party fold. The elder Mr Essebsi, who had tried to appear above the fray, is reported to have told his son and Mr Marzouk to let someone else lead the party. But tensions within Nidaa Tounes will remain. The party is a patchwork of leftists, liberals and conservatives, as well as trade unionists and businessmen, many of whom have ties to the regime of Zine el-Abidine Ben Ali, the former dictator. They united under the banner of Nidaa Tounes, and the leadership of Mr Essebsi, to oppose Nahda, a moderate Islamist party that led the government from late 2011 to early 2014. There is, however, “no unifying ideology, no political programme, no socioeconomic vision”, says Maha Yahya of the Carnegie Middle East Centre, a think-tank. A party congress meant to give it a more formal structure has been repeatedly postponed.

After winning the general election in 2014, Nidaa Tounes formed a ruling coalition with Nahda and two other parties, and nominated an independent politician, Habib Essid, as prime minister. Those decisions rankled with many of those in Mr Marzouk’s camp, who hoped the party would create a more assertive, secularist government. (Any split in Nidaa Tounes would, ironically, make Nahda the largest party in parliament.) The Islamists are themselves divided over the partnership, but Rached Ghannouchi, the eminently sensible leader of Nahda, says it will continue to support the coalition.

If the government survives, as expected, that may be its biggest accomplishment. It has done little to reform the inneficient economy, which still favours old elites. The public sector, already too large, has recently grown. Corruption, say some, is worse than ever. America has promised generous new aid, but in the long-neglected interior of the country there is little development. “I have no idea what has changed [since the revolution],” says Ghaith Lamami, a lawyer in Sidi Bouzid, where the Arab spring protests began. “Do you think this looks like a developed city?”

The lack of economic progress in the countryside makes securing Tunisia more difficult. Thousands of Tunisians are thought to have joined Islamic State in Iraq, Libya and Syria. But disgruntled young men with dim job prospects need not travel that far. Some are joining Islamic militants in the mountains around Kasserine, in the west, where several fighters and a Tunisian soldier were killed on November 15th, two days after the militants beheaded a teenage shepherd suspected of spying.

Some fear the jihadist threat will lead to a power grab by the security sector, parts of which are seen as conniving with entrenched businessmen and mafia-like figures. Tunisia is still struggling to come to grips with a legacy of abuses by the authorities. Yet the current situation has left other Tunisians feeling nostalgic. In the minibus from Kasserine to Tunis, the capital, several passengers are in agreement: things were better under Mr Ben Ali.

-The Economist