Sometimes one or two events can change the political mood all over the world. The release of Mr Nelson Mandela from prison in February 1990 came just three months after the fall of the Berlin Wall. Those two events inspired democrats and liberals across the globe.
Sadly, the current mood is much less optimistic and much less friendly to democracy. It has been shaped by the collapse of the Arab Spring of 2011 into bloodshed and anarchy. Autocrats all over the world, above all in Russia and China, now point to the Middle East as an example of the dangers of premature democratisation.
The politicians who captured the spirit of the early 1990s were inspirational democrats such as Mr Mandela, Mr Vaclav Havel in Czechoslovakia - and reformers such as Mr Mikhail Gorbachev and Mr Boris Yeltsin in Russia.
Today, the leaders that seem to embody the spirit of the age are autocrats with scant respect for democratic values - men like Mr Vladimir Putin and Mr Recep Tayyip Erdogan, the presidents of Russia and Turkey; as well as Mr Donald Trump, a trash-talking demagogue who has somehow become the Republican nominee for president of the United States.
The figures confirm the general impression that this is a bad period for democrats. Freedom House, a think-tank that issues an annual report on the state of democracy, argues that political freedom has been in retreat for the past decade. It reported earlier this year that in 2015, "the number of countries showing a decline in freedom for the year - 72 - was the largest since the 10-year slide began".
The least free part of the world is the Middle East, which is a bitter disappointment given the hopes roused by the uprisings against autocratic regimes that broke out across the Arab world five years ago. Egypt is suffering from a harsher autocracy than the Mubarak regime that was overthrown in 2011.
Even in Europe, some of the freedoms won in 1989 are imperilled. In both Poland and Hungary there has been an erosion of press freedom and judicial independence. In Turkey, on the borders of the European Union, hard-won freedoms are also being lost as journalists and judges are arrested in the wake of an attempted coup.
In parts of Asia, things have also gone backwards. Thailand experienced a military coup in 2014 and on Sunday voted in favour of a new Constitution that could cement the military's control over politics. In Malaysia, liberals are in despair at the machinations of the scandal-plagued government and Anwar Ibrahim, a prominent opposition leader, is once again in prison.
In the two most important autocratic powers - Russia and China - the governments are cracking down harder on liberals who dare to challenge the regimes.
Last week, China issued long prison sentences for human rights lawyers in Tianjin and forced others into humiliating apologies. At about the same time, in Russia, Yevgeny Urlashov, a prominent opposition politician, was sentenced to 12 years in a penal colony on corruption charges that appear to have been trumped up.
The problems of democracy have extended even into the US, the "leader of the free world". Even if Mr Trump fails to win the presidency, he has already done immense harm to the prestige and dignity of US democracy.
But amid all this bleak news it is important to remember that not all the trends are pointing in the wrong direction. In Myanmar, Ms Aung San Suu Kyi - who was under house arrest when Mr Mandela was released in 1990, has been freed - and the country's first civilian-led government for more than half a century took power this year.
Democracy seems well-established in Indonesia, the world's fourth most populous country. And Nigeria, Africa's largest country, last year saw its first presidential election in which an incumbent lost - and then ceded power peacefully.
Most important of all, the evidence remains that, for all the cultural and economic differences between countries, people all over the world eventually get fed up of corruption, censorship, injustice and political violence.
Just this weekend, people were out on the streets of Ethiopia, demonstrating against a government that has delivered rapid economic growth but also sharply restricted political freedoms. In recent years, pro-democracy demonstrators have taken to the streets of Hong Kong and Ukraine to demand political and civil liberties.
The uncertain nature of the moment we are living through is captured by current events in South Africa, which played such an inspiring role in the 1990s. Last week, the African National Congress (ANC), the party of Mr Mandela, saw its support slump in local elections as voters reacted against the corruption and inefficiency of the government of President Jacob Zuma.
The pessimistic view is that Mr Zuma and his cronies will do whatever it takes to hang on - and that their machinations will further damage South African democracy.
The optimistic view is that the ANC's electoral troubles are an example of democracy's ability to renew politics as voters turn to new parties like the Democratic Alliance.
The nervousness of leaders like presidents Zuma, Putin and Erdogan is telling. Behind their swagger lurks a deep insecurity. Autocracy might be making advances across the world. But it always ultimately sparks resistance.