By refusing to give Catalans and Kurds autonomy, Spain and Turkey leave them with little choice.

As Catalans vote this weekend in an election that their leaders will consider a de facto referendum on secession from Spain, the government in Madrid seems dumbfounded. It simply maintains that Catalonia has no constitutional right to break away — as if the separatists care about the laws of a country they don’t want to be part of anymore.

Their inability to empathize with Catalonia’s desire for independence is not unique.

In Turkey, President Recep Tayyip Erdoğan’s government is similarly stunned by what it sees as a sudden surge in Kurdish nationalism. In elections this summer, a pro-Kurdish party for the first time cleared the 10 percent election threshold to win seats in parliament. Erdoğan’s ruling Islamists quickly called another election to try and reverse this outcome.

The Turkish government simultaneously launched an anti-terror campaign in response to an ill-timed resumption of violence by the Kurdistan Workers’ Party (PKK), a far-left Kurdish militant group.

Erdoğan’s attempt to paint all Kurdish nationalists as terrorists isn’t working, however. If anything, he may end up radicalizing the entire movement.

Just as Madrid’s refusal to grant Catalonia more autonomy has given nationalists there little choice but to seek all-out independence, Turkey’s attempts to shut the Kurds out of the political process and suppress their culture and identity are giving the country’s largest minority little alternative to armed struggle and separatism. At least as long as Erdoğan stays in power, that seems to be the only way they can preserve their heritage.

What the Turkish leader should have done, argues Soner Cagaptay, an expert in Turkish politics, in Foreign Affairs magazine, is give in to some of the autonomy movement’s demands.

Çağaptay points out that Turkey’s Kurds aren’t as ethnically homogenous nor as geographically concentrated as is commonly assumed. Half have migrated out of their homeland in Turkey’s southeast. One in six Kurds is married to a Turk.

Accordingly, addressing Kurdish demands in Turkey means granting comprehensive cultural rights to all of the country’s citizens, Kurd or not, irrespective of location. Reforms would include access to education and public services not only in Kurdish but in other minority languages as well.

Çağaptay suggests that Turkey can learn from Spain and decentralize. Madrid gave the Basques local political power which pulled the carpet out from under the violent wing of their independence movement. Most Spanish Basques — who have more autonomy than the Catalans — are now content to remain part of the Spain.

Çağaptay is pessimistic, though, that the “Ottoman-nostaligic” Erdoğan will realize as much. It’s not just that he worries about losing Turkish nationalist votes to the far right; he simply fails to grasp what it is that the Kurds want.

Similarly, Spanish prime minister Mariano Rajoy just doesn’t seem to get why the Catalans are so upset.

He has ridiculed their attempts to hold an independence referendum and criticized the regional government of Artur Mas for supposedly mismanaging the region’s economy (Spain’s richest).

But Catalans don’t back Mas because they think he has governed well — at least not in the first place. Many support him because he currently represents Catalonia’s best hope of gaining independence.

Like Turkey’s Kurds, the Catalans are not a wholly separate nation. They have their own language but also speak Spanish. In fact, more Catalans claim Spanish as their first language than Catalan. Through the centuries, Catalans have moved to other parts of Spain and people from other regions of Spain have settled in Catalonia. Author Antonio Muñoz Molina has argued in the Financial Times that very few things in Catalonia would be as they are were it not for their connection with the rest of Spain. “No influence has ever gone in only one direction,” he wrote; “nothing has ever been clear-cut.”

As recently as 2010, only one in five Catalans supported independence. When Spain’s Constitutional Court threw out most of the region’s autonomy statute that year, sentiment began to shift. The same court later blocked an independence referendum and the central government has tried to frustrate and water down Catalan autonomy at every turn. Now almost half of Catalans see no alternative to going it alone.

If a majority of Catalans votes for separatist parties on Sunday, blame Madrid’s intransigence. If the Kurdish struggle in Turkey turns more violent, it would be at least partially Erdoğan’s fault. Time is running out to preserve the unity of Spain and Turkey. Leaders in both states should be willing to share power — or they could lose what they are fighting for.