The terrorist attack that killed at least 37 people at a beachfront hotel in Tunisia on Friday illustrates the potential dangers for the country's otherwise determined pursuit of democracy. But it need not be a permanent setback, as long as Tunisian leaders stick to the plan and don't succumb to the pressure and temptation to revert to old habits and a repressive crackdown.
Friday's assault, by three gunmen in the coastal Tunisian city of Sousse, occurred in a place that is popular with Tunisian and European tourists. It follows the widely publicized attacks in March on another popular tourist destination, the Bardo Museum in the capital Tunis, and the killing of four police officers in two incidents in the northwest and center of Tunisia earlier this month.
All this suggests that Tunisia now faces the monumental task of advancing democratic gains amid heightened security threats at a time when terrorist attacks across the country -- and the counterterrorism operations in response -- have intensified.
And it won't be easy: Tunisia was heralded as the success story of the Arab Spring, but has struggled to strike a balance between citizens' demands for security and their calls for reforming institutions to end the abuses of the country's authoritarian past. Meanwhile, even though leaders have initiated reforms, these democratic processes take time, and each terror attack shortens the public's patience.
Tunisian President Beji Caid Essebsi underscored the pressure his government is facing to increase security when he visited the United States in May. There, he spoke frequently of the need and desire for his country to be a leader in the war on terror, especially in light of the estimated 3,000 Tunisian foreign fighters who have joined the ranks of ISIS in Syria and Iraq.
Such statements come at a time when Tunisia's Parliament is debating a controversial anti-terrorism law that risks eviscerating due process. Indeed, civic activists have voiced concern -- and, at times, fear -- that Tunisia will slip back into its authoritarian past by prioritizing stability over democracy. After all, the same procedures were used under former dictator Zine al-Abidine Ben Ali to squash political dissent.
However, Tunisia's President has also said he wants his administration to be known as a government of reform, and Friday's attacks present Tunisian authorities with an opportunity to demonstrate that democratic principles will win.
Many Tunisians have voiced discontent with the investigation of the Bardo attack, which killed more than 20 people in March, saying that process hasn't adhered to the kinds of standards -- including a transparent and inclusive investigative process -- that they hope for. At the center of this debate is Tunisia's Interior Ministry, which is responsible for the police, the gendarmerie and other internal security forces, and is charged with eliminating the oppressive practices that still linger from the 25-year regime of Ben Ali, even amid a growing terrorist threat across the region.
Will the government succeed in balancing these demands?
Tunisia's constitution is a model in protecting human rights and promotion of civil liberties, but those values remain fragile in the country amid the growing debate over how best to prevent and punish persistent attacks by extremists.
Still, this is also a dilemma that Western countries face, especially in light of the latest attack in France, also on Friday. And if Tunisia is willing to take steps like openly investigating lapses in security, the country can preserve its democratic commitments to protect rights and liberties, regardless of the challenges posed by extremists seeking to undermine such gains.
Finally, civil society has an important role in all this.
While most Tunisians condemned the terrorist attacks on vacationers in Sousse, some activists also accused security forces of heavy-handedness in their response to such incidents. There have also been suggestions that some of those security forces are more concerned with shutting down coffee shops to enforce the fasting traditions of Ramadan than establishing constructive relationships with citizens that will help prevent violence.
Tunisian authorities can ease concerns about both rights and security through open dialogue with the public and robust, transparent processes. Civil society, meanwhile, must balance constructive advocacy with upholding its responsibility for cooperating with authorities when it's appropriate.
While much of the debate in Tunisia centers on how to effectively address the proliferation of home-grown extremists and the return of foreign fighters, citizens across the country have been adamant about the need for a service-oriented police force, one capable of engaging positively with citizens while upholding the new democratic principles of the constitution.
Joyce A. Kasee is a program officer for the Middle East and Africa team at the U.S. Institute for Peace, a nonpartisan institution established and funded by Congress to increase U.S. capacity to manage international conflict without violence. The views expressed are her own.