Fear and anger won the election in Brazil. It’s a Wake-up call for the world.

As goes Brazil, so goes democracy? It is no good outsiders pouring contempt on Jair Bolsonaro, victor in Sunday’s Brazilian presidential election. He is the choice of his people. For non-Brazilians, it is what he represents, not what he says, that matters.

Brazil has been one of the world’s most exciting emergent nations, yet its evolution over 30 years from dictatorship to hesitant democracy seems to have stalled. Bolsonaro has exploited the oldest politics, that of self-interest, and also the newest, that of anger, polarisation and fear. Voters have stomached his distaste for gay people, feminism, rainforests and the rule of law, to rid themselves of a corrupt leftwing regime unable to contain street violence. A famously tolerant nation has opted for military and economic discipline.

In any country, the apparent breakdown of social order will drive voters to extremism. This message has proved popular around the world, from Rodrigo Duterte of the Philippines, Andrés Manuel López Obrador of Mexico, Viktor Orbán of Hungary, Recep Tayyip Erdoğan of Turkey, even America’s Donald Trump. Liberal values, however defined, will not survive when their defenders cannot transmit their virtues to voters.

The lesson for champions of open democracy is glaring. Its values cannot be taken for granted. When debate is no longer through regulated media, courts and institutions, politics will default to the mob. Social media – once hailed as an agent of global concord – has become the purveyor of falsity, anger and hatred. Its algorithms polarise opinion. Its pseudo-information drives argument to the extremes. Even an apparently stable democracy such as Germany this week finds its centrist consensus torn apart, as the electorate divides between far right and radical left.

Every continent is now seeing the emergence of (mostly) rightwing disrupters. They appeal to those who feel excluded by “identity politics”, by what they perceive as liberal pandering to minorities. They feed on religious intolerance and on neighbourhood insecurity. They spit anger at any form of establishment. Yapping in their van are the jackals of social media, spreading fear.

In the light of the rise of the new right, it is not enough for liberals to stay silent. Lies and hatred cannot be purveyed across the globe for profit. Hysteria and anger cannot become standard political discourse. The boring modalities of democracy – regulating elections, curbing censorship, taming extremism, fighting corruption – all matter crucially.

Democratic leadership is becoming inured to moderation. Britain is no exception. What should be a sensible debate over trade policy has become polarised and polluted with anger. Coalition and compromise appear impossible. The outcome could yet be disastrous. That is the message of Brazil.