Over the past two decades, Turkey, Hungary, India and Venezuela gave the world a lesson on how democracy can erode into “competitive authoritarianism” — a system in which elections are still meaningful, but leaders manipulate the rules to their own benefit while systematically violating civil liberties.

Now we are starting to find out what happens when even partial democracy becomes a significant threat to the authoritarians.

The latest example comes from Turkey, where protests are raging after the arrest of Istanbul Mayor Ekrem Imamoglu, the country’s most prominent opposition politician.

The government accused him of accepting bribes, rigging bids and misusing citizens’ personal data; he has denied the charges.

Istanbul University also rescinded his diploma; having a university degree is a requirement for Turkish presidential candidates.

Imamoglu’s growing popularity made him a significant contender in Turkey’s next presidential election, and he was jailed on the day of his party’s presidential primary.

His arrest, experts say, sent a clear message that President Recep Tayyip Erdogan is no longer willing to give the opposition a real chance to win elections.

Erdogan seems to have recognized that even if he manipulates the system, he may not be able to beat Imamoglu, said Lisel Hintz, a political scientist at Johns Hopkins University who studies Turkey’s politics.

“So this move is an anticipatory move, trying to take the one individual who could potentially challenge Erdogan off the playing field,” she said. “This is really a clear shift from what we would call competitive authoritarianism to full authoritarianism.”

Solving the authoritarian equation

Turkey has not gone as far as Russia, where there is little meaningful political opposition to President Vladimir Putin’s control. But many see the government’s actions as a significant step in that direction.

To understand why this is happening, it is helpful to think about elections as a kind of equation of costs and benefits for authoritarian leaders to solve.

On one side are the benefits of elections, which are often considerable, even for leaders who are not particularly invested in democratic freedoms. Winning them validates an authoritarian leader’s popularity and power, even if the election was not entirely free or fair. That bolsters the government’s legitimacy at home and its relationships with other countries. And it sends a powerful signal to elites in the country’s military, business community and other important constituencies that they should continue to support the government.

On the other side of the equation is the obvious risk of holding competitive elections: The incumbent can lose. That appears to be what happened in Venezuela last year, for example, when President Nicolás Maduro’s efforts to secure his victory through behind-the-scenes manipulation failed and his opponent won by a landslide, according to independent observers. Maduro then clumsily declared victory for himself anyway.

In India, events took a slightly different turn. Prime Minister Narendra Modi tried to weaken the opposition by arresting its leaders, cutting off their access to funds and limiting media freedom. In the end, his party lost its majority in parliament anyway. Modi remained prime minister but must now govern in coalition with other parties, considerably limiting his power.

The Trump effect

In Turkey, experts say recent events have made it less attractive for Erdogan to allow competitive elections.

The potential cost of a relatively open election grew as Imamoglu became more popular. Years of persistently high inflation, exacerbated by Erdogan’s economic policies, have also made many Turks angry.

And the benefits of an open election shrank, largely because of the geopolitical ripple effects from the reelection of President Donald Trump in the United States, said Asli Aydintasbas, a visiting fellow at the Brookings Institution.

The Trump administration does not appear to value the promotion of democracy abroad, and Trump seems to have an affinity for authoritarian leaders like Putin. Additionally, waning U.S. support for NATO and defending Europe has made the continent more reliant on Turkey, which has the alliance’s second-biggest military and a flourishing defense industry.

The result is that Erdogan has received very little criticism from allies in Europe and the United States who might once have opposed electoral manipulation or other undemocratic behavior.

“President Erdogan has gambled on Turkey’s rising influence and leverage in this particular geopolitical climate, and he may be right about that,” Aydintasbas said.

Authoritarian incompetence

In Turkey, inflation and economic struggles have made it increasingly difficult for the government to maintain its popularity. That is due in part to the nature of competitive authoritarianism, which tends to reward loyalty over capability.

“Incompetence makes it much more difficult to manage the economy in a way that would appeal to the people,” said Selim Erdem Aytac, a political scientist at Koc University in Istanbul.

The government’s arrests of Imamoglu and other opposition politicians and journalists have triggered a significant backlash. Protests that first broke out on university campuses have spiraled into the largest demonstrations the country has seen in more than a decade, despite a crackdown by the government.

But it is not clear whether the protests have much capacity to make a difference. Years of democratic backsliding have insulated the government from many of the consequences of its heavy-handed rule. Such backsliding tends to be incremental and cumulative, which avoids triggering immediate public condemnation — but also makes that condemnation less effective when it eventually does come.

“Once you are at a stage where you think, ‘Oh, that’s not acceptable,’ you don’t have the tools to prevent it,” Aytac said. “The judiciary is already captured. The media is already captured.”