It turns out that democracy works just fine for tyrants and dictators (the two are similar, except that the former is much nastier than the latter). For centuries, rulers believed that democracy was bad for their job security. Turned out that was not true. This was most vividly revealed after the communist states of East Europe suddenly dissolved (by popular uprising of fed up subjects) in the late 1980s. Even the Soviet Union, that got this spate of tyranny going in the early 1990s, fell victim to popular anger.
Some of the former communist rulers were prosecuted for their crimes, but most were just removed from power. In those states without any tradition of democracy, the only people with political experience were the former communist bosses. And in many of those nations, the communists rebranded themselves and ran for office, often successfully. Once in power, old habits returned. Not just the desire to stay in power for life, but knowledge of techniques for keeping populations in line. These neo-communist dictators quickly realized that "dictatorship via democracy" wasn't new. There were other examples, among existing democracies. A good example is Egypt, which has been a democracy for half a century, but is still run by a president-for-life and one all-powerful political party. How do they do it? Simply by using a combination of techniques borrowed from police states and real democracies. Basically, you lie, control the media, and create enemies (external and internal, real and imagined) to distract the population. Adroit use of police and courts keeps potential rivals weak and disorganized. Best of all, it works, and not just in Egypt.
The only down side is that much of the population remains unhappy and yearning for a better government (and economy, which tends to get plundered by these corrupt tyrants.) The corruption is a necessary part of keeping elected dictatorships in power. You need money to buy the loyalty of the security forces, and officials that oversee the effectiveness of the scam. And this really is a scam, which often includes bribing the voters as well as deceiving them. In North Korea, which is still suffering from famine, the distribution of food is dependent on the population cooperating with their own subjugation.
The widespread use of this new form of government has confounded Western nations, that had hoped the widespread adoption of democracy would help suppress corruption and bad government that had long caused unrest and war in much of the world. The current spate of Islamic terrorism was triggered by a popular movement to replace corrupt governments with religious dictatorships. This has proved to be a false hope, as the few religious dictatorships that have appeared (Iran and Taliban Afghanistan) failed.
But getting a real democracy going turns out to be more difficult than believed just two decades ago. Turns out that you need more fundamental changes, like widespread education and economic freedom, to make democracy work. While it's relatively easy to implement mass education (except in some Islamic countries where the education of women is not popular, at least among the men). But economic freedom, which requires a reliable judicial system, has to overcome centuries of privilege and corrupt methods that the rich use to cripple completion and maintain the wealth of a relatively few families. In the West, the economic freedom and rule of law is called "civil society." Turns out that, on examining the historical record, one realizes how long it takes for the old customs to be transformed. Speeding this up is difficult, although Iraq has become a laboratory for discovering ways to make this happen. No one yet knows how this will all end. But in the meantime, the widespread survival of tyrannical government generates more unrest and terrorism.