"Esc!” It’s the key on the top left of the keyboard that you hit frantically when your laptop crashes. Confronted by the ghastly reality that some of their proudest creations – Google, Facebook and Twitter – helped propel Donald Trump into the White House, the tech titans of Silicon Valley are hitting esc like panic-stricken sophomores whose term papers have frozen before they clicked on the “save” icon.

“Content moderators” are being hired by the thousand. Fake accounts are being closed. The News Feed is being “fixed.” Esc, esc, esc. But that page is still frozen. And it will take more than esc to fix this. More like alt+ctrl+del.

It wasn’t supposed to be this way. For a time, it seemed as if the internet was on democracy’s side, helping the crowds in Cairo’s Tahrir Square or Kiev’s Maidan topple terrible tyrants. “Current network technology … truly favours the citizens,” wrote Google’s Jared Cohen and Eric Schmidt in their 2013 book The New Digital Age . “Never before have so many people been connected through an instantly responsive network,” with truly “game-changing” implications for politics everywhere.

Mr. Cohen and Mr. Schmidt’s 2010 article “The Digital Disruption” presciently argued that authoritarian governments would “be caught off-guard when large numbers of their citizens, armed with virtually nothing but cellphones, take part in mini-rebellions that challenge their authority.” The “real action” in what they called “the interconnected estate” could be found in “cramped offices in Cairo” as well as “on the streets of Tehran. From these locations and others, activists and technology geeks are rallying political ‘flash mobs’ that shake repressive governments, building new tools to skirt firewalls and censors, reporting and tweeting the new online journalism, and writing a bill of human rights for the internet age.”

Even more euphoric was Mark Zuckerberg, the co-founder and chief executive of Facebook. In 2015, he called the internet “a force for peace in the world.” Connecting people on Facebook was building a “common global community” with a “shared understanding” of the problems confronting humanity.

Oh, happy days. Oh, glad, confident morning. Sadly, over the past two years, it has gradually become apparent that internet may pose a bigger threat to democracies than to dictators. For one thing, the growth of network platforms with unprecedented data-gathering capabilities has created new opportunities for authoritarian regimes, not least in China and Russia, to control their own populations more effectively.

For another, the networks themselves offer ways in which bad actors – and not only the Russian government – can undermine democracy by disseminating fake news and extreme views. “These social platforms are all invented by very liberal people on the west and east coasts,” said Brad Parscale, Mr. Trump’s digital-media director, in an interview last year. “And we figure out how to use it to push conservative values. I don’t think they thought that would ever happen.” Too right.

Having initially dismissed as “a pretty crazy idea” the notion that fake news on Facebook had helped Mr. Trump to victory, Zuckerberg last year came clean: Russians using false identities had paid for 3,000 Facebook advertisements that sent implicitly pro-Trump messages to Americans before and after the election. By some estimates, between 146 and 150 million users – more people than voted – had seen posts from accounts linked to the Internet Research Agency, a pro-Kremlin organization, including around 16 million users of Instagram, which Facebook owns.

One analysis of six Russia-linked Facebook pages found that their posts had been shared 340 million times. And those were just six of 470 pages that Facebook had identified as Russian. Trolls with false identities had also used Facebook Events (the company’s event-management tool) to promote political protests in the United States, including an Aug. 27, 2016, anti-immigrant, anti-Muslim rally in a rural Idaho town known to welcome refugees.

In May, 2016, two Russian-linked Facebook groups had organized simultaneous opposing protests in front of the Islamic Da’wah Center of Houston. “Heart of Texas,” a bogus group claiming to favour Texas secession, had announced a noon rally on May 21 to “Stop Islamification of Texas.” Meanwhile, a separate Russian-sponsored group, “United Muslims of America,” had advertised a “Save Islamic Knowledge” rally for exactly the same place and time. This wasn’t the kind of global community Mark Zuckerberg had envisaged.

This is not just an American story. To an extent that is not well enough appreciated, it is a global crisis of democracy. Similar efforts were made, albeit on a smaller scale, to influence the outcome of the British referendum on European Union membership – mainly via fake Twitter accounts – as well as last year’s elections in the Netherlands, France and Germany. And the fact that the Russian meddling in the 2016 U.S. election has since become the focal point of multiple inquiries in Washington – which may even pose a threat to the legitimacy and longevity of Mr. Trump’s presidency – does not mean that similar things are not going on in other countries even as you read this article. Canadians have good reason to worry about how social media could impact their country's 2019 federal election, for example. When Facebook and Twitter told MPs last year that they could increase public engagement in the debates between party leaders, some people wondered how much of this would be provided by Russian bots.

Yet the most alarming revelation of the past year is not the importance of Russian fake news, but its unimportance. Former president Barack Obama implicitly acknowledged that in his recent Netflix interview with David Letterman. Having swept into the White House in 2008 as the first candidate of the social media age, Obama acknowledged that he had “missed … the degree to which people who are in power, special interests, foreign governments, et cetera, can in fact manipulate [social media] and propagandize.”

However, the former law professor made no attempt to lay all the blame on outside forces. “What the Russians exploited,” he said, “was already here … [The fact that] we are operating in completely different information universes. If you watch Fox News, you are living on a different planet than you are if you listen to NPR. That’s what’s happening with these Facebook pages, where more and more people are getting their news from. At a certain point, you just live in a bubble. And that’s part of why our politics is so polarized right now.”

What happened in 2016 was much more than just a Kremlin “black op” that exceeded expectations. It was a direct result of the profound change in the public sphere brought about by the advent and spectacular growth of the online network platforms. In many ways, the obsessive focus of the American political class on the Russian sub-plot is a distraction from the alarming reality that – as the European competition commissioner Margrethe Vestager argued earlier this month – the big tech companies, and the way their services are used by ordinary people, pose a much bigger threat to democracy. It is the threat from within we really need to worry about – not the threat from Putin.

A polarization problem

We are nearly all addicts. The website eMarketer estimates that adult Facebook users in the United States spent roughly 41 minutes a day on the platform in 2017. And that’s just our favourite app. The average smartphone user clicks, taps and swipes that insidious little device an amazing 2,617 times a day.

And we don’t just passively read. We engage. We like. We retweet. We reply. We comment. Now, it must be admitted that most of what we write is inane. In Canada, the five most-commonly used words in Facebook status updates are: “day,” “hangover,” “loud,” “ticket” and “word.” (“Hangover” is ranked 7th in Britain and 8th in the United States – make of that what you will.)

But a fair amount of what we engage with online is news. Two-thirds of U.S. adults are on Facebook. Nearly half – 45 per cent – get news from Mr. Zuckerberg’s platform. More than one in 10 Americans get news from YouTube, while roughly the same proportion (11 per cent) get news from Twitter. In Canada, 51 per cent of people get their news from digital sources first. As a recent Harvard paper co-authored by Gary King demonstrates, the network platforms essentially amplify news from established news outlets. As they do so, however, a strange thing happens. Whether one looks at blogs or at Twitter, social media tend to promote polarization. Liberal bloggers link to liberal bloggers, rarely to conservative ones. Liberal Twitter users re-tweet one another, seldom their conservative counterparts. And tweets on political topics – gun control, same-sex marriage, climate change – are 20 per cent more likely to be retweeted for every moral or emotional word they employ.

Note also that political Twitter is not for everyone. As Daniel Hopkins, Ye Liu, Daniel Preotiuc-Pietro and Lyle Ungar have shown, by analyzing nearly five million tweets generated by four thousand Twitter accounts in August, 2016, it is “very conservative” and “very liberal” users who are most likely to tweet political words.

We see a similar phenomenon when we analyze the Facebook followers of U.S. legislators. In both the House of Representatives and the Senate, the pattern is clear: The more ideologically out there you are – whether to the left or the right – the more followers you are likely to have.

In this context, it becomes apparent that Russian fake news represented a drop in an ocean of inflammatory political commentary that was overwhelmingly indigenous. Between March, 2015, and November, 2016, 128 million Americans created nearly 10 billion Facebook posts, shares, likes and comments about the election. Remember how many Russian ads there were? That’s right: a paltry 3,000.

According to new research by Brendan Nyhan of Dartmouth College, Andrew Guess of Princeton University and Jason Reifler of the University of Exeter, roughly one in four Americans saw at least one false story in the run-up the presidential election. But fake stories were just 1 per cent of the news Hillary Clinton supporters read, and 6 per cent of the news Trump supporters read.

Remember, too, that not all the Russian-sourced news was fake. The tens of thousands of e-mails hacked from the accounts of John Podesta and other Democrats were as real as they were confidential. But it wasn’t the Russians who were driving the traffic on the Breitbart website to record highs. It wasn’t the Russians who explained to the Trump campaign how they could use targeted Facebook advertising to compensate – with precision – for what they lacked in dollars. It was Silicon Valley: its big data, its algorithms, its employees.

A matter of priorities

Don’t take it from me. Take it from former Facebook staff who have spoken out in the past year. Antonio Garcia Martinez, the former Facebook engineer and author of the book Chaos Monkeys , put it starkly: “I think there’s a real question if democracy can survive Facebook and all the other Facebook-like platforms,” he said in an interview. “Before platforms like Facebook, the argument used to be that you had a right to your own opinion. Now, it’s more like the right to your own reality.”

Facebook’s propaganda was all about building a global community. But in practice, the company was laser-focused on the bottom line – and highly resistant to outside criticism. Sandy Parakilas, who worked as an operations manager to fix privacy problems on Facebook’s developer platform in advance of its 2012 initial public offering, has said that the company “prioritized data collection from its users over protecting them from abuse.”

“When I was at Facebook,” he said last year, “the typical reaction I recall looked like this: Try to put any negative press coverage to bed as quickly as possible, with no sincere efforts to put safeguards in place or to identify and stop abusive developers.” The policy was to “react only when the press or regulators make something an issue, and avoid any changes that would hurt the business of collecting and selling data.”

Perhaps the most scathing assessment came from former vice-president for user growth, Chamath Palihapitiya. “I think,” he told an audience of students at Stanford’s Graduate School of Business in December, “we have created tools that are ripping apart the social fabric of how society works. … The short-term, dopamine-driven feedback loops that we have created are destroying how society works. No civil discourse, no co-operation: misinformation, mistrust. And it’s not an American problem – this is not about Russians ads. This is a global problem.”

Mr. Palihapitiya said he felt “tremendous guilt” about his own part in this because he believed he and his former colleagues “kind of knew something bad would happen.” He is not alone in feeling guilty. Facebook’s first president, Sean Parker, has talked in similar terms. Another early employee told Vanity Fair, “Most of the early employees I know are totally overwhelmed by what this thing has become. They look at the role Facebook now plays in society … and they have this sort of ‘Oh my God, what have I done’ moment.”

True, in recent months Facebook has scrambled to respond to all this recrimination. On Sept. 21, for example, Mr. Zuckerberg pledged to work “pro-actively to strengthen the democratic process.” Facebook would require that all political ads disclose which page paid for them and ensure that each ad is accessible to everyone. Later last year, he announced plans to clamp down on “bad content and bad actors” by doubling the number of employees and contractors who handle safety and security issues to 20,000 by the end of 2018. And just last week, he announced an overhaul of the News Feed to prioritize “meaningful interaction” between users over the kind of media-generated content that advertisers like.

But if you think this kind of self-regulation is going to fix democracy’s social-media problem, then I have a bridge to sell you. For one thing, it would take at least an order of magnitude more people to achieve meaningful monitoring of the vast amount of content that Facebook’s two billion-plus users produce and share every day. For another, none of this alters the company’s fundamental business model, which is to sell advertisers the precision targeting that Facebook’s user data allows. Political advertising may henceforth be identified as such, in the way that it is on television. But just how much less effective will that make it?

Google says it will curate its “News” search results more carefully, to rank established newspaper sites above bulletin boards such as 4chan or Reddit, which are favourite channels for alt-right content. Anyone who thinks that will stop people reading fake news hasn’t found the “scroll down” button on their keyboard.

A new kind of politics

The reality is, no matter how Facebook, Google and Twitter tweak their algorithms, a new kind of politics has been born. It can no more be unborn than the new kind of politics born when television revealed how much better-looking John F. Kennedy was than sweaty Richard Nixon, with his five o’clock shadow. Or how easily Lyndon Johnson could make Barry Goldwater seem like a man who wanted to drop atomic bombs on little children.

There are now two kinds of politicians in this world: the kind that know how to use social media as a campaign tool and the ones who lose elections. All over the world, the distinction is clear. The populists of the right and of the left understand the power of social media. The moderates who occupy the centre ground, with few exceptions – Justin “Selfie” Trudeau is one of them – are still playing by 1990s rules.

Among the few indicators that Mr. Trump had a good chance of beating Ms. Clinton were his enormous leads on Facebook and Twitter throughout the 2016 campaign. Applying similar metrics around the world yields startling results. Take Britain, for example. The Leave campaign’s victory in the 2016 referendum on Britain’s membership in the European Union owed a great deal to its pioneering use of Facebook advertising. Yet the principal political beneficiary of Brexit – the woman who became prime minister shortly after the referendum, Theresa May – is a social-media loser, with little more than half a million Facebook followers and even less on Twitter. By comparison, the Labour Leader Jeremy Corbyn – a grizzled populist of the left in the style of Bernie Sanders – has 1.3 million followers on Facebook followers and 1.7 million on Twitter (numbers as of Jan. 18). No other British politician comes close. Boris Johnson is often mentioned in the same breath as Mr. Trump, but all the two men really have in common is big hair. Mr. Corbyn has four times more Twitter followers than “BoJo.”

Britain has no election scheduled for 2018 – although it is possible Ms. May’s woefully weak government could fall as the economic costs of Brexit make themselves felt and the harsh realities of the EU’s divorce terms become apparent. Elsewhere, however, electorates are preparing to vote in general elections, notably in Brazil, Colombia, Italy and Mexico. These contests will give us a chance to see how far the new politics has spread.

Start with Brazil, a country whose political elite has been battered by corruption scandals that led to the impeachment of the Workers’ Party President Dilma Rouseff and probably disqualify her predecessor, Luiz Lula da Silva, from running this year. But who cares? Lula has three million Facebook followers and just 189,000 Twitter followers. Far ahead of him on social media is Luciano Huck, the entrepreneur and television star, host of the hugely popular Saturday night TV show Caldeirao do Huck . With 17 million Facebook followers and nearly 13 million on Twitter, Mr. Huck is in a league of his own in Brazilian politics.

A Huck candidacy would be the Brazilian equivalent of Oprah Winfrey (FB 11.6m, TW 41.4m) running for president in 2020. He is not a populist; he’s just popular. In second place, however, comes Jair Bolsonaro (FB 5m, TW 0.8m), the former army parachutist whose political positions make Mr. Trump seem like a lily-livered liberal. Mr. Bolsonaro is an unabashed defender of the military dictatorship that ruled Brazil between 1964 and 1985. Name any politically incorrect position; Mr. Bolsonaro has taken it. “I would never rape you,” he once told a female politician, “because you do not deserve it.”

Italian politics was in many ways the experimental laboratory for the kind of candidate who combines wealth and celebrity with political incorrectness. Silvio Berlusconi has claimed, not without justification, to have been the prototype Trump. Despite a criminal conviction, Mr. Berlusconi is still a political player, though more of a kingmaker than a candidate these days. Yet he is behind the times (FB 1m, TW 19,300). The King of Twitter in Italy is former prime minister Matteo Renzi (FB 1.1m, TW 3.34m), although on Facebook he trails the populists: the two Five Star Movement leaders, Beppe Grillo (FB 1.9m, TW 2.5m) and Luigi di Maio (FB 1.1m, TW 0.3m), as well as the Northern League leader Matteo Salvini (FB 1.9m, TW 0.6m).

In Mexico, the best-known populist – Andrés Manuel López Obrador, universally known by his initials as “AMLO” – is a man of the left. On social media (FB 2.3m, TW 3.5m), AMLO is far ahead of the likely PRI nominee José Antonio Meade (FB 0.3m, TW 1m) and his PAN (National Action Party) counterpart Ricardo Anaya Cortes (FB 0.9, TW 0.4). True, AMLO is not the most followed Mexican politician: Rafael Moreno Valle, the former governor of Puebla, is now neck and neck with him on Facebook. Only just behind AMLO on Twitter is the mayor of Mexico City, Miguel Angel Mancera. But neither Moreno Valle nor Mancera is going to be a presidential candidate.

Politics on Colombian social media also leans left. There, the leading figure is Gustavo Petro (FB 0.9m, TW 2.8m), the former mayor of Bogotá, who as a young man belonged to the guerrilla group the 19th of April Movement and who made his political reputation as an opponent of the conservative presidency of Álvaro Uribe.

The inescapable threat

It used to be that all politics was local. Today, perhaps, all politics is becoming social, in that social media have emerged as the crucial battleground of modern elections. Just a few years ago, that would have seemed like a good idea. What could be more democratic, after all, than enabling politicians to communicate their messages directly to individual voters, and to hear back from them in real time? The only thing to worry about was whether or not online speech was truly free – the core preoccupation of Freedom House’s annual “Freedom on the Net” survey.

But what if the biggest threat to democracy is not online censorship or surveillance, but the near-total absence of regulation of politics on social media? The public is beginning to sense this. A new Gallup-Knight survey, published last week, revealed that 57 per cent of Americans think that the way sites choose which stories to show to users presents “a major problem” for democracy. Just less than half of those interviewed favoured regulation of how the network platforms provide news.

The difficulty is knowing what form regulation should take. As Sam Lessin – another former Facebooker – has argued, the real transformation of the public sphere is that a candidate “can for the first time effectively talk to each individual voter privately in their own home and tell them exactly what they want to hear … in a way that can’t be tracked or audited.”

Forget fake news, Mr. Lessin argues. Forget the “feed bubbles” and “echo chambers” that have dominated the discussion in the United States. The real challenge is not that the public sphere has grown polarized. The challenge is that it has been so fragmented by misnamed social media that it is no longer a single public sphere.

“It has been a foregone conclusion for a long time,” Mr. Lessin concludes, doubtless remembering the inspirational Zuckerberg speeches of the pre-2016 era, “that the internet has been a vehicle for moving us toward speaking one common language and being able to work together to solve the great problems of our era. … The sad reality is that the most exciting attempt to bring our world together is putting us at risk of not being able to trust what we see or hear” – but (and this is the point he missed) voting for the most engaging candidate anyway.

Hit “esc” all you like. This is the real – and inescapable – threat facing every democracy today.

This excerpt from Niall Ferguson’s new book, The Square and the Tower: Networks and Power From the Freemasons to Facebook (Penguin Press), was originally published in the Globe and Mail.