How to interpret the recent unrest on the streets of Istanbul and about 50 other Turkish cities? Specifically, is it comparable to the Arab uprisings over the last 2 1⁄2 years in Tunisia, Libya, Egypt, Syria, Yemen and Bahrain?

On one level, they appear unrelated, for Turkey is a far more advanced country, with a democratic culture and a modern economy. But the issue of autocracy ties them together, suggesting that the Turkish demonstrations could have a potentially deep importance.

The rebellion did not come out of nowhere. I was in Istanbul last fall, and it was clear then that Prime Minister Recep Tayyip Erdogan’s dictatorial tendencies worried Turks more than his Islamic aspirations. I heard unceasing criticisms about his being “intoxicated with power,” an “informal caliph” and “Turkey’s elected chief social engineer.”

Turks enumerated a lengthy list of authoritarian symptoms they suffered from the decade-long rule by Erdogan’s Justice and Development Party, or AKP: suppression of political criticism, crony capitalism, manipulation of the judiciary, unjust imprisonment, show trials and a disregard for the separation of powers. In particular, they evinced annoyance at the way Erdogan seeks to impose his personal tastes on the country.

The recent demonstrations are protesting these actions and more. What began as a localized dispute over the uprooting of a small park at Taksim Square in the heart of modern Istanbul has rapidly grown into a national statement of defiance.

Erdogan is no Moammar Gadhafi or Bashar Assad, and he will not massacre peaceful demonstrators, but heavy-handed police operations have reportedly led to 1,000 injured and, according to Amnesty International, four deaths. Further, the prime minister has reacted defiantly, not just insisting on his original plan for the park, but announcing he can do whatever he pleases.

As paraphrased by Hurriyet Daily News: “A mosque will be built in Taksim, Erdogan said. He added that he did not have to take permission from the main opposition leader or a ‘few marauders’ for the projects, noting that the authority had already been given by people who voted for the AKP.”

Erdogan is saying, in other words, that having voted the AKP into office, Turks have given him authority to do anything he wants. He is the elected, unaccountable padishah. Well, the demonstrators and those hitherto eager foreign investors will have something to say about that, perhaps putting the country’s China-like economic growth at risk.

Significantly, Abdullah Gul, the president of Turkey and increasingly Erdogan’s rival, adopted a very different approach to the protests. “Democracy does not only mean elections,” he said. “The messages delivered with good intentions have been received.” By distancing himself from the prime minister, Gul exacerbated Erdogan’s isolation.

Turkey has been heading in the wrong direction under the AKP. Although a democracy, the AKP government has jailed more journalists than any other state in the world. Although secular, it has with growing urgency imposed arrays of Islamist regulations, including recent rushed limitations on alcohol as well as warnings against public displays of affection.

Thanks to the demonstrations, we can be newly hopeful that Turkey may avoid the path it had been on, that of despotism, Islamification and increasingly rogue foreign relations. Perhaps its secular, democratic and pro-Western heritage can be revived.

Daniel Pipes is president of the Middle East Forum and a columnist for National Review. This piece originally appeared in the Los Angeles Times.