TUNIS, Tunisia • An explosion tore through a bus carrying members of President Beji Caid Essebsi's security guard in the heart of Tunisia's capital on Tuesday evening, killing at least 12 people and prompting Mr Essebsi to declare a 30-day state of emergency.
In a statement, Mr Essebsi, who was not near the site of the explosion, called the blast a "cowardly terrorist attack".
He cancelled a scheduled trip to Switzerland and announced a nightly curfew beginning at 9pm. The Tunis airport and tourist sites were closed after the explosion, according to media reports.
Mr Essebsi said that, as well as the dead, 20 members of the presidential guard had been injured. There was no immediate claim of responsibility.
The blast was the third major attack by militants in Tunisia this year, and the first serious assault on the security forces in Tunis since militants began a campaign of violence in 2011.
It occurred on Mohammed V Avenue, near Avenue Habib Bourguiba, the city's storied commercial thoroughfare and the location of the headquarters of the ministries of interior and tourism, along with other important landmarks.
This year's 26th Carthage Film Festival, which was under way, was cancelled.
After the uprising in 2011 that toppled the country's dictatorship, Tunisia defied the civil strife that took hold in countries throughout the region, including war-torn Libya. But its transition to democracy has been threatened repeatedly by political violence, including assassinations of prominent figures and militant attacks.
Tunisia, a country of about 11 million people, has also been shaken as thousands of its citizens have travelled to Iraq and Syria to join the Islamic State in Iraq and Syria (ISIS). The exodus has confounded policymakers and earned Tunisia an unwanted distinction as a wellspring of regional extremism.
The violence has shaped Tunisia's emerging political order, as well. Ennahda, the country's main Islamist party, won the first legislative elections after the uprising but faced criticism for failing to curb the militants. Mr Essebsi rose to the presidency pledging a crackdown on extremists and greater stability.
ISIS has been associated with two deadly attacks in Tunisia this year: one in March at the Bardo National Museum in Tunis, which killed 22 people, and one in June at a beach hotel in Sousse, which killed 38 people, including 30 British tourists.
A state of emergency was imposed after the Sousse killings and later renewed, before being lifted at the beginning of October.
But on Sunday, a militant group claimed the beheading of a young Tunisian shepherd on behalf of ISIS, accusing him of having informed the army about their movements.
His killing on Nov 13 sparked outrage in Tunisia. His killers ordered a 14-year-old who was working with him to bring the victim's head wrapped in plastic to his family. The video in which the claim was made, whose authenticity could not be confirmed, was denied by the government.
The attacks have undermined the government's promise of stability at a time when some are warning that the violence will prompt the authorities to overreact and limit citizens' rights.
"We're going into this war with everything we have," Mr Essebsi said in a televised address after the explosion.
"Victory will be always be on Tunisia's side."
After the deadly attacks claimed by ISIS in Paris and Beirut, the Tunisian authorities increased the security level and deployed soldiers and police officers to patrol the city.
It was not immediately clear if the explosion was caused by a bomb or an explosive fired at the bus.
Reuters, citing unnamed government and security officials, said that the security officers had been boarding the bus at the time of the explosion and that the blast had probably been caused by a suicide bomber.
NEW YORK TIMES, AGENCE FRANCE-PRESSE