Iranian demonstrators taking to the streets of Tehran during a protest, days after Mahsa Amini died in police custody in September.

Editor’s Note: John Avlon is a CNN senior political analyst and anchor. He is the author of “Lincoln and the Fight for Peace.” The views expressed in this commentary are his own. Read more opinion at CNN.

CNN  — 

We’ve gotten used to headlines predicting the demise of democracy. While the threats we face are real, a glance around the globe shows that it’s autocrats who are in retreat right now.

Connect the dots between the demonstrations in China, the months of protests in Iran and Russian President Vladimir Putin’s failures after his invasion of Ukraine and you’ll see that autocrats are on the backfoot as we come to the end of 2022.

John Avlon

The pendulum seems to be swinging back toward democracy. It’s a welcome reminder that the people ultimately have the power and that, for all our imperfections, democracies have more durable strength because of our liberty, diversity and creativity. It’s time to restore our confidence in this global conflict between democracy and autocracy.

A year ago, many people were predicting the opposite trajectory for our time, with The Atlantic capturing the bleak assessment on its cover with the headline, “The Bad Guys Are Winning.”

But life can come at you pretty fast, as Chinese President Xi Jinping has learned. A few weeks ago, he was riding high, having secured a third term as head of the Chinese Communist Party, unprecedented since the time of Chairman Mao Zedong. But China’s zero-Covid policy has backfired badly, and now people are rising up in multiple cities at the same time – something almost unheard of in that surveillance state.

Xi’s regime is, in fact, more unsteady than it seemed. This is compounded by a real estate bubble which promises to weaken the economy and a demographic time bomb which undercuts its overwrought reputation for inevitable dominance in the 21st century.

Strong men are always weaker than they seem. Nine months ago, Putin’s quick triumph over Ukraine seemed all but assured. Bad call. The will of the people of Ukraine to defend their democracy is a reminder that autocracies cannot ultimately overcome free people willing to defend their liberty.

Putin’s standing at home has been weakened through mass conscriptions and protests that continue as many of the best and brightest continue to leave that country. This war has cost Russia time, talent and treasure – while the NATO alliance has been revived, with previously neutral Sweden and Finland poised to join.

Then there’s the Islamic Republic of Iran. The theocrats have been in power for more than 40 years, but the death of a young woman while in custody of Iran’s morality police has sparked three months of continued protests across the country. These sustained protests might prove to be the most important story of 2022.

Within democracies, nationalist leaders with autocratic impulses – from outgoing President Jair Bolsonaro in Brazil to presidential hopeful Marine Le Pen in France – have seen defeats in recent months.

But even before these stories collided there were signs of the pendulum swinging back. In June, the Pew Research Center found that global attitudes toward the United States and NATO were at or near all-time highs among major allied nations – a sea-change from 2020, the last year of the Trump presidency.

Not only that, Russia and Putin were seen as decided pariahs – with a stunning 90% of respondents in the annual Pew Global Attitudes survey saying they have no confidence in Putin to do the right thing in world affairs.

If that seems obvious, remember that in 2020 former President Donald Trump was viewed as less trusted to do the right thing than Russia’s Putin and China’s Xi.

I want to be clear: This shift toward democracy and away from autocracy is no reason to break out the “mission accomplished” banner. There are plenty of places in the world where autocrats feel emboldened. North Korea, Nicaragua and Saudi Arabia come to mind. There are additional headwinds which cannot be dismissed, from the rise of populist demagogues to disinformation amplified via social media that makes reasoning much more difficult. But to the extent that dictators have tried to band together and offer an alternative to democracy, the broad pushback by the people they seek to control is a hopeful sign for the future of human freedom.

Get our free weekly newsletter

It’s a reminder that the inevitable overreach by societies who try to control human beings is ultimately not sustainable, even though they use the levers of fear and greed to coerce people into submission – and may succeed for a time.

This battle is far from over. But I’m willing to bet that when we look back on 2022, we’ll see it as a time when the pendulum began to swing back from autocracies toward democracies. We cannot know if their efforts will ultimately dislodge any of these dictators, but they remind us in real time that heroism is not simply something for history books.