Let’s face it: Democracy is struggling. Sure, it surged after the fall of the Berlin Wall, reaching a high-water mark in the first years of the 21st century with various inspirational "colored" revolutions. But then democratic gains in Eastern Europe, Africa, and Latin America stalled, or even deteriorated, as fragile democracies struggled under the enormous challenge of governance. The expensive U.S. failures to impose democracy in Iraq and Afghanistan haven’t helped. Today, many countries that once seemed budding with democratic promise now appear mired in political infighting, beset by power grabs by ousted elites, or trapped in downward spirals of poverty and unemployment. And the seemingly inexorable rise of autocratic China, in sharp contrast with gridlocked western democracies, has some wondering whether democracy is even worth pursuing.

While many people have enjoyed rising wealth and stability under autocracy (most of them in China), we remain convinced that democracy is the least bad form of government out there, to paraphrase Churchill. And thankfully, there’s some statistical evidence to back up our belief that democracy is still the best way to realize both freedom and prosperity. Although economists for more than 50 years have debated whether democracy or autocracy is better for growth, more recent studies tip toward democracy.

The hard truth, however, is that the transition from authoritarianism to democracy is notoriously difficult. History suggests that transitioning countries’ move toward genuine substantive democracy characterized by resilient majority rule, free and fair elections, and strong minority and civil rights protections will be slow. The bad news is that for countries like Egypt, Tunisia and Myanmar it’s likely to be a long and bumpy ride.

Many experts once believed that economic growth led inevitably to democracy. Although most rich countries in the world today are relatively democratic, some — such as China and Saudi Arabia — have enjoyed growing economic prosperity without a commensurate increase in political freedoms. Indeed, studies show that it’s not economic growth but rather economic crisisthat triggers regime change. Over the past three decades, many democratic transitions have been precipitated by serious economic shocks that ruptured the authoritarian bargain.

Indonesia is the poster child for getting the most out of an economic crisis. Its remarkable transition to democracy was precipitated by the onset of the Asian financial crisis in 1997 that ushered in deep political and economic reforms. In Brazil, a structural economic crisis in the 1980s paved the way for its transition from military government to democracy. Mexico experienced a similar trajectory as the 1982 debt crisis set off political and economic change. In the Middle East uprisings of recent years, the economic shocks of rising food prices and youth unemployment played a strong role — although whether the transitioning Arab countries will be able to consolidate democracy and usher in much needed economic reforms remains to be seen.

Tempting as it may be to engineer an economic shock in your least favorite autocracy, economic crises can also unfortunately make the most odious governments hunker down even more. (Think of the sanctions on Iran or North Korea.) And hold on to your hats if the price of oil sharply declines. Resulting economic crises in places like Saudi Arabia and Russia are likely to spur transitions — and all the turbulence that goes along with that.

The bottom line here is the need to recognize how economic crisis can upend the status quo and open the door for fundamental change. In anticipation of that moment, policymakers should pursue strategies to nurture a middle class. Once upheaval hits and democracy begins to take root, a resilient middle class can be the necessary safeguard against backsliding to autocracy.

2. On elections, "Fake it till you make it."

A clear lesson from our case studies is that elections — even sham elections — lead to greater success in the transition to substantive democracy. International observers often denounce flawed elections as meaningless attempts to dress authoritarian rule in the trappings of democracy, but elections can also sow the seeds of public expectations that over time blossom into democratic demands that cannot be ignored.