KASSERINE, Tunisia // Assassins mounted on scooters gun down two secular politicians. Roadside bombs cripple soldiers in the mountains. An ambush this week leaves eight soldiers dead - five with slit throats.
Among the countries of the Arab Spring, Tunisia is widely considered to have the best chance for a successful democracy. But the emergence of an armed Al Qaeda-linked jihadi group in the wooded valleys and caves of a mountainous region near the Algerian border threatens to derail the tenuous transition.
It is a remote region of unpaved streets, smugglers and strong distrust of the government, despite a stepped-up military effort to defeat the militants.
The Jebel Chaambi mountains, established as a national park to protect curved-horned Barbary sheep and endangered gazelles, has now become a haven for Al Qaeda in North Africa.
The stakes are high for this North African nation, whose educated, mostly middle-class population started revolutions around the Arab world in 2011, and which is on the cusp of completing a constitution written by Islamist and secular parties working together.
But growing insecurity may be among the biggest threats to the transition.
After the assasination of a leftist opposition leader last week, the second such shooting this year, the government has come under pressure from street protests, secular parties, and members of its own coalition - who have all urged the ruling Islamist Ennahda party to step down.
Yesterday, Salem Labyedh, the education minister, resigned as a roadside bomb went off as a national guard patrol passed 30 kilometres south of Tunis without causing casualties or damage, a commander told Shems-FM radio.
The government ascribes the mounting violence to a jihadist group linked to Al Qaeda's branch in North Africa, including militants who fled the French military intervention in Mali.
The unrest is challenging security services too underfunded and overstretched to fight a major terrorist threat, one that could also lead to attacks on Europe and undermine the democratic prospects of the Arab revolutions.
"Tunisia could become like Somalia. Other countries have the economic resources to fight terrorism but we have nothing," Gen Rachid Ammar, then the head of Tunisia's army, warned at the end of June. "I see in Tunisia today signs that make me afraid and keep me from sleeping." He resigned shortly after those comments.
Extremism was long kept in check under the strong-arm regime of the secular dictator, Zine El Abidine Ben Ali, but after Tunisians overthrew him in January 2011, political prisoners were given amnesty. The government said that among them were Islamist extremists who have gathered new Tunisian recruits and set up training camps with the help of Algerian Al Qaeda veterans and the support of ultraconservative salafis.
Al Qaeda in the Islamic Maghreb, the North African branch of the terror network, had originally taken a hands-off approach to Tunisia. That attitude is changing as Ennahda has increasingly reached out more to secular opposition parties. In March, Al Qaeda issued a statement urging Tunisians not to fight in Syria, but instead to stay home and oppose efforts to secularise the country.
The Tunisian militants named their organisation the Oqba Ibn Nafaa brigade, after the seventh-century Arab warrior who conquered Tunisia. Officials have linked it to the assassination of two left-wing politicians, one of whom was shot outside his home just last week in a killing that sparked broad anti-government protests.
After a roadside bomb blew the leg off a soldier patrolling the national park in April, Tunisia sent hundreds of troops to search for the militants in Jebel Chaambi. Two months and 10 explosions later, the army declared the mountain cleared, at a cost of three lives.
The army found documents, identification cards, food and weapons stashes, indicating a well-organised group with ties to Al Qaeda and with support from the local population in nearby Kasserine. Kasserine is criss-crossed with angry graffiti demeaning policemen and asking "where is development for Kasserine?"
Much of the region survives on smuggling from Algeria, just a few dozen kilometres away. "Everyone smuggles. Otherwise no one would eat," said a well-dressed smuggler in his 30s who traffics food and petrol. "The police don't have time to interfere. They let us work while they are busy with the bandits and terrorists."
He said that in Mr Ben Ali's time, smuggling was rigidly controlled. When the jihadists set up shop, they hooked into networks of militants who capitalised on the insecurity to grow their smuggling. A local police commander, speaking on condition of anonymity, said the militants blended into the population, shaving their beards and wearing ordinary clothes.
Resource-poor Tunisia does not have the aircraft and monitoring technology to effectively police the thousands of miles of desert and mountain frontiers with Libya and Algeria.
The country sent just 280 soldiers to search Jebel Chaambi during the crisis - while oil-rich and militarily powerful Algeria announced it would secure its side of the border with 6,000 new troops.
"They are building infrastructure, finding people who share their ideas and training in arms," military analyst Mohammed Ahmed, a retired lieutenant colonel, said of the militants. "If we do nothing, they will move into the active phase."
* Associated Press with additional reporting from Agence France Presse