Attempts by Catalonia and Iraqi Kurdistan to break free have backfired, posing sobering lessons for other separatists and those who rule them. If there’s any takeaway, it’s that both parties should exhibit flexibility, in case the bluff is called.

Without question, the organizers of the twin independence referenda miscalculated by ignoring warnings of a harsh reaction from above. Rather than enjoying newfound freedoms, what were once semi-autonomous regions with substantial powers are left, at least for now, with little or none. And it’s not clear they’ll ever get any back.

Iraq acted decisively to punish the vote held on September 25, sending in troops to seize the oil fields and territory around Kirkuk, considered by Kurds to be a cultural capital. The humiliated regional president, Masoud Barzani, resigned. Meanwhile in Spain, Madrid sent police, who beat up hundreds of peaceful Catalan voters on October 1. Last Friday, it sacked the provincial government and parliament and imposed direct rule. Yesterday, protests erupted after nine Catalan ministers were jailed for disobedience, and the demonstrations are likely to gain force in the coming days. Catalan secessionists are unlikely to limp away quietly and forget the sorry chapter.

These fiascos should trouble any of the dozens and dozens of separatist groups globally that might be contemplating exit strategies, among them Belgium’s Walloons and the Faroe islanders of Denmark. More importantly, the political chaos following the referenda should also give pause to central governments facing restive ethnic minorities. While the secessionists were shortsightedly stubborn, their national governments equally should have been more willing to discuss concessions. Rigidity and force encourages grudges and radicalism rather than capitulation. Better to recognize identity concerns and not force integration. That’s what Britain did with Scotland, and Canada with Quebec. That’s how Switzerland achieved its fabled peace in the last century.

What Iraq and Spain fail to understand is that these peeved groups have legitimate local support for their cause. Cultural memories remain powerful, which is why the Kurds and Catalans have clung to grievances that are decades or centuries old. Those that have been aggressively denied a voice will continue to be confrontational. Renewed defiance might not be immediate, but, as we have seen in countless other examples, dreams of self-determination pass on through generations if brusquely ignored.

The Kurds have been trying for a century to get their own homeland, to the discomfort of the countries that host the scattered population: Iraq, Iran, Syria, and Turkey. They have a distinct language and their population of more than 25 million is the world’s largest group of stateless people. They almost achieved their dream of home rule under the 1920 treaty that abolished the Ottoman Empire, but a subsequent international agreement that etched modern Turkey’s borders erased that provision. Hopes rose again after the 2003 invasion of Iraq, when the new constitution that followed created a proto-state, the Kurdish Regional Government (KRG), helmed in Erbil. It won significant powers, including its own army, which later played a decisive role in expelling ISIS from Iraq’s northern territories including Kirkuk. Emboldened by this achievement, the KRG gambled on calling for full independence, to the great consternation of its US allies and neighboring countries with sizable Kurdish populations.

Catalonia, in contrast, was self-governed back in the Middle Ages. A merger with other parts of what is now modern Spain brought it under Madrid’s rule, where many have complained that their traditions and culture have been sidelined. Catalans especially suffered under the dictatorship of Francisco Franco, from 1939 to 1975, who repressed their language. Ever since, many have felt an urge to assert their identity.

However, money as well as identity motivates Kurdish and Catalan go-it-alone sentiment. Both provinces have valuable resources that are diverted to benefit other parts of the nation. The Kurds understandably feel entitled to more monetary fruits after shouldering much of the fight to push out ISIS from territory it had seized. Kirkuk produces about half of Iraq’s oil exports, a lucrative source of income that would help support a new state.

Catalonia is one of the wealthiest regions of Spain, and secessionists unhappily note that it accounts for nearly one-fifth of Spain’s economy, and contributes more in taxes than it gets back from the government. This sense of economic injustice deepened during the euro-debt crisis over the past decade, when at one point one in four Catalans were without jobs. Not surprisingly, public opinion polls showed a big rise in support for independence, even if regional leader couldn’t explain how a new country would survive economically.

The international community normally views secession as a local matter, not withstanding the unease by Washington and Iraq’s neighbors over Kurdistan and by the EU over Catalonia. As a general rule, it rejects or ignores the legitimacy of separatist movements. While the charter of the UN embraces the principle of self-determination, in practice no international laws permit a community from severing itself from the whole. This lack of clarity in global norms often leads to rough treatment by the central governments fighting dismemberment, as we have seen in the Indian occupation of Kashmir and Russia’s vicious crackdown in Chechnya.

So what is a central government to do?

Copy Canada and Britain, which showed flexibility toward statehood strivers in, respectively, Quebec and Scotland. Such pushes for freedom are often ways to win more rights, which are more wisely granted rather than exercising brute force. Spain’s Constitutional Court lost such a chance in 2010 by rejecting a statute of autonomy that would have referred to Catalonia as a “nation” and allowed more judiciary and fiscal powers. (While Catalonia had control over such matters as education, police, and commerce, administering justice largely fell to the Spanish state.) It’s worth noting that some of Madrid’s autonomous regions have more local powers than others, the Basque Country among them.

Scotland and Quebec, like Catalonia and the Kurds, had a fraught history with central government. They both had independent sources of income—Quebec is the second-richest province, which pays the highest taxes to the federal government. North Sea oil lies off of Scotland. Britain and Canada undermined feisty secessionism by allowing independence referenda, which then failed to muster enough votes in favor. We’ll never know for sure, but it’s probable that simply allowing the vote meant less people felt they needed to take a stand at the polls. The free-Quebec movement lost two independence votes, in 1980 and 1995. Scotland’s attempt fell flat in 2014. Rather than dismissing the defeat with a “we told you so,” the British government pragmatically handed more power to the Scottish Parliament, including control of some taxes, welfare policies, and fracking. In Canada, the House of Commons in 2006 passed a motion that recognized the Québécois as a “nation” within unified Canada. It was largely symbolic, but words carry weight.

Going forward, it is hard to imagine Catalans and Kurds giving up on their exit aspirations. The best-case scenario in Iraq would be serious negotiations between Erbil and Baghdad on managing wealth, something unlikely to be resolved any time soon. In Spain, snap regional elections called by Madrid for December 21 in Catalonia are unlikely to dampen separatist sentiment, especially if the sacked parliamentarians and erstwhile leader Carles Puigdemont are arrested for defying the state. The Spanish government would be wise to keep them out of jail rather than making this an issue.

Policy-makers weighing devolution elsewhere ought to look to Switzerland. We tend to forget that this paragon of neutrality has a violent and divisive history. Its main exports in during the Renaissance were hardened mercenaries, who served the princely states of France and Italy. (The Swiss Guard of the Vatican with its antiquated uniforms and halberds harkens back to that era.) Afterward, leaders had to contend with uniting four language groups and two hostile religions. Just 170 years ago, civil war tore at Switzerland. The modern confederation of 26 cantons that emerged thereafter brought stability by devolving financial and other powers in the most direct form of democracy anywhere. This system essentially revived one that preexisted in the Middle Ages, in which towns were left alone to run their own affairs. Furthermore, Switzerland granted equal status to the various linguistic groups, thus avoiding the imposition of a singular national identity that would favor one over the others. According to studies on happiness, the residents of cantons with the highest degrees of self-rule are the most content.

For sure, national governments want to protect their territorial integrity and should not give into every demand posed. But they need to spend more time listening closely. Understanding why certain ethnic quarrels persist so obstinately would help dissolve them. Imagine the bloodshed that could have been avoided if India allowed Kashmiris to vote on secession. Or if the Soviets had permitted Chechnya to form its own state in the 1990s. Along similar lines, think, too, of what could have been if Mexican authorities had been flexible in Chiapas rather than fomenting more disobedience with suppression. Over the course of history, separatist struggles repeat themselves in the same locales. We live at a time of resurgent identity politics, and ignoring voices will not make for peace with defensive populations with lasting umbrage. Conflict resolution often depends not on cracking down but on letting go. Central states need to use a lighter touch, or else the same problems will come back to haunt them.