ISIL is ending with a whimper rather than a bang. This week, the Iraqi government announced that the so-called “caliphate” has been defeated in Mosul, the largest city it had managed to control for the past three years. The fringe terrorist organization, which once mesmerized and horrified the world, only has a few small desert towns left in northern Iraq and eastern Syria. Its biggest lasting impact will most likely be on civil liberties in the Middle East and throughout the world, as ambitious government elites have used it as a pretext to grab power. This development is no surprise in Egypt or Turkey—but French democracy is also in danger.

After an ISIL-inspired attacks in Tunisia in 2015, the government of Beji Caid Essebsi imposed a state of emergency, which it renewed just last month. It allows suppression of demonstrations and trial of civilians in military tribunals. Terrorism is a threat to Tunisia, with spillover from the faction-fighting in Libya a concern. As a new democracy that has carried out successful parliamentary elections since the overthrow of dictator Zine el-Abidine Ben Ali in January of 2011, however, Tunisia needs to consolidate human and civil rights. As in other cases around the world where states of emergency have been implemented supposedly to fight terrorism, the Essebsi government is showing marked signs of mission creep. The provisions are now being used against corrupt businessmen and smugglers who are being court-martialed when they could more appropriately be tried in civilian courts.

Given that Egypt under President (formerly Field Marshall) Abdel Fattah al-Sisi is more or less a military dictatorship with little or no rule of law, it may not matter much that the government there, too, announced a state of emergency last January after an ISIL-related attack on Coptic Christians, who form some 6 percent of the Egyptian population. In the months since, radical Muslims have killed some 100 Copts. The state of emergency has allowed the Sisi government to continue its vendetta against the Muslim Brotherhood, a conservative fundamentalist group that seeks to bring Islam into politics. Sisi, who overthrew an elected Muslim Brotherhood president in 2013, maintains that the Brotherhood is a terrorist organization indistinguishable from ISIL, which is not true. The Egyptian state is fighting a determined insurgency in the Sinai Peninsula, where just last weekend ISIL-affiliated fighters killed 26 soldiers. This situation does not require a state of emergency throughout the country, especially since the government routinely rides roughshod over basic human rights in any case. Presumably, the state of emergency is a hedge against any judge brave enough actually to apply the 2014 constitution in defense of citizens’ rights.

Turkey’s state of emergency is not primarily related to ISIL, though the bombings carried out by terrorists from that group there in 2015 and 2016 contributed to a sense of instability that lies in the background of the July 15, 2016, failed military coup. President Recep Tayyib Erdogan blamed the coup on the shadowy Gulen organization, which works for political Islam, and with which he had previously partnered. He has had 150,000 alleged members arrested, and 100,000 fired, while closing down entire universities, purging thousands of professors and staff, and arresting large numbers of journalists. Many of those targeted appear not to be Gulenists at all but secular and leftist critics of Erdogan’s right-wing pro-Muslim party. Erdogan is also fighting what amounts to a low-intensity civil war with the Kurdistan Workers Party, but he has extended it to attack the left-leaning and entirely nonviolent Democratic Peoples’ Party, whose leader he had removed from parliament and jailed. Modern Turkey has never been very democratic, but it had experienced an opening toward political pluralism during the 2000s. That time of hope is now a distant memory. The state of emergency, which Erdogan has said will not be lifted as long as the threat of “terrorism” remains, is the nail in its coffin.

After the 2015 ISIL-inspired attacks in Paris that left 130 dead, the Socialist government of Francois Hollande declared a state of emergency. That decree has since been renewed six times, most recently by the new government of Emmanuel Macron, who extended it through November. It allows house searches without a warrant and the banning of protests and marches. Now Macron wants to enshrine these repressive measures in law by statute, making them permanent.

Every life is precious, but the average annual number of French killed in terrorist attacks during the past decade is approximately 25. The average annual number of criminal homicides in this country of 67 million is typically around 900. The danger of terrorism is real, and as ISIL dwindles it may lash out in revenge at countries such as France, whose fighter jets hastened its demise. The threat, however is not sufficiently dire to go back to the period before the French Revolution, when kings could issue lettres de cachet or bills of attainder at will, arresting individuals with no due process. That attack on the Bastille in 1789, which began French democracy, was in part a protest against arbitrary imprisonment of the sort Macron now wants to make law.

A handful of radical Muslims are not the only targets of the legislation. The state of emergency has already allowed the state to conduct thousands of warrantless searches of homes, businesses, and religious edifices, to place hundreds of people under house arrest, and to crack down on union and student protests. The aim seems not so much to combat terrorism as to strengthen the government against civil society. The irony is that the Declaration of the Rights of Man and the Citizen, passed by the French Constituent Assembly in 1789, has provided civil liberties to French citizens during much more dangerous eras than the current one.

Yasser Louati has pointed out that the provision for a state of emergency in the 1958 constitution that established the Fifth Republic very much derived from the colonial crises of that time, especially the Algerian Revolution. Just as arbitrary measures were deployed in a vain attempt to retain Algeria as a colony, he argues, those sorts of policies were now being deployed toward French citizens of North African heritage, as they are increasingly coded as internally colonized or as “the enemy within” (a phrase applied by René Gontier to Jews in the 1930s).

A state of emergency that suspends constitutional rights can perhaps be justified for a week or two after a major disaster, when social order temporarily breaks down amid looting and lawlessness. A state of emergency that responds to a few shootings or manifestations of ethnic discontent and becomes permanent is inimical to democracy and to basic human rights. All states would like their students and workers to sit down and shut up. All states are opportunistic and would like extra tools for crowd-pleasing stunts like anti-corruption drives. All states have internal colonies—Kurds in Turkey, North Africans in France, Bedouin in Egypt’s Sinai, African Americans in South Carolina—and all states would like to be able to set aside constitutional rights in order to repress them. Terrorism is a form of crime, and should not be fetishized. It is not intrinsically different from other violent criminality and should be dealt with sternly and constitutionally (just as other kinds of crime are). In the age of a fading ISIL, the danger is that ambitious state elites, enabled by hysterical publics, will take away the rights achieved in the Enlightenment and after through hard and persistent struggle. That would be a tremendous victory for the radicals, who always held that democracy is a cruel sham.