Gunmen killed at least eight Tunisian soldiers on Monday, staging the biggest attack on the security forces in decades as political tensions rose between supporters and opponents of the Islamist-led government.
President Moncef Marzouki called the ambush on Mount Chaambi, near the Algerian border, a "terrorist attack" and announced three days of mourning. Tunisian troops have been trying to track down Islamist militants in the remote region since December 2012.
Tunisians fear they may be sliding into one of the worst crises in their political transition since autocratic leader Zine al-Abidine Ben Ali was forced to flee during a 2011 uprising that set off revolts across the Middle East.
Gunmen kill at least eight Tunisian troops as political tensions grow
"In all countries of the world, when the state faces a terrorist attack people come together. But I don't see anything like that happening in Tunisia. All we see is divisions and chaos," Marzouki said in a televised address.
"I call on all politicians at this historic moment to stand for the nation and unite."
Residents said that thousands took to the streets in the town of al-Qasreen, near the site of the attack on the army, and many protesters were demanding the government's ouster.
In the capital, Tunis, more than 10,000 took to the streets as well in one of the biggest protests since the opposition began mobilizing against the government.
"Tunisia is free, out with terrorism, out with Ghannouchi," protesters shouted, referring to Rached Ghannouchi, leader of the Ennahda party.
"Since they (Ennahda) came all we've seen is a string of catastrophes," said protester Noura Saleh, who was waving a red Tunisian flag and crying. "Get out, we hate you!"
State television cut off normal programming to show pictures of the dead soldiers and wounded comrades, broadcasting Quranic verses and patriotic anthems in the background.
"After the soldiers were ambushed and shot dead, their throats were slit and their clothes were ripped," a military source told Reuters.
"After that, three soldiers pursuing the attackers were wounded when a landmine exploded."
Instability has been rising amid growing political chaos. Last week, Tunis was hit by its first-ever car bomb, though no one was hurt.
The secular Ettakatol party, a junior partner of the moderate Islamist Ennahda, called on the ruling party to step down to stave off more turmoil. It said a new administration representing a wider consensus was necessary.
"If Ennahda rejects this proposal, we will withdraw from the government," Lobni Jribi, a party leader, told Reuters.
Prime Minister Ali Larayedh ignored the calls to create a unity government and said he would carry on leading the country.
Protests aimed at ousting the government intensified last week after the second assassination of a secular opposition politician in six months.
The government blamed hardline Salafist militants for both attacks, but the opposition holds Ennahda responsible. It argues that the leadership has not done enough to investigate and crack down on militant attacks.
Despite previous unrest, Tunisia had been a model for democratic transition among the "Arab Spring" states. But divisions are growing between government backers and the opposition, which has been emboldened by the Egyptian army's ousting of elected President Mohamed Mursi and subsequent crackdown on his supporters.
Ennahda supporters are determined to avoid a similar fate.
The opposition may be able to mobilise Tunisians further against the government after Monday's ambush, which shocked the country and increased anti-government sentiment on social media.
Many people joining the growing street protests express anger at Tunisia's instability and economic stagnation. Others are frustrated that the constitution, originally promised within one year after the 2011 uprising, has yet to be completed and are suspicious of the transitional government.
This week the opposition rejected all concessions and efforts at reconciliation by Ennahda and said it was planning to create its own rival "salvation government."
Tunisia's powerful General Union of Tunisian Workers was in talks with the opposition on Monday. It said it was considering a strike, a move that would paralyse much of the country.
Larayedh struck a note of defiance in a speech on Monday, calling the opposition protesters "coupists." He also challenged his critics to act constructively.
"We are open to all kinds of dialogue with all sides," he said. "Any specific proposals to increase the effectiveness of the government, bring them forward."
A Constituent Assembly is only weeks away from completing a long-delayed draft constitution to be put to a referendum.
The secular opposition has called for the 217-member Assembly to be dissolved. In the last few days, more than 70 lawmakers have left the body and set up a sit-in protest outside its headquarters.