IN the autumn of 2016 the media became preoccupied images of so-called killer clowns – people wearing horror masks and clown costumes, often carrying knives or other weapons. It was never entirely clear how many of these evil figures were really stalking the streets of Britain and America. Police Scotland issued a warning in October that action would be taken against people wearing “threatening costumes”. But killer clowns were largely a social media phenomena – an internet meme which perhaps expressed a growing fear that society was going slightly crazy.

If so, it was only too prescient. Two months later, on November 9, a political killer clown, Donald Trump, was elected the 45th president of the United States. The property tycoon and reality TV star doesn't wear clown shoes, but with his orange face, eccentric hair and perma-rage expression he makes a pretty frightening character nevertheless. “Bitte Nicht – Den Horror-Clown” was how one German newspaper reported his election as leader of the “free” world.

There have been crooks in the Oval Office before, but it is hard to think of a more threatening commander in chief in 240 years of American democracy. Trump's gun-club manifesto read like a wish list of the far right. He would build a 1000-mile wall to keep out Mexican “rapists”; ban all Muslims entering the USA; jail “crooked” Hillary Clinton; expel 11 million illegal immigrants.

It was largely fantasy and the pledges evaporated almost as soon as Donald Trump became President-elect. Only the unthinking belligerence remained. His idea of a Christmas message to the world was to issue one of his notorious semi-literate tweets promising a new nuclear arms race. Trump is a kind of anti-politician, an internet troll – belated confirmation, perhaps, of the forecast by John Adams, the second American president, that American democracy would eventually commit suicide.

It's not clear how much the alt-right media helped Donald Trump's election campaign, but there was widespread self-congratulation among the white supremacists and conspiracy theorists of 4chan, the horror clown version of Facebook. It hatched many of the “fake news” stories that appeared on the internet in 2016. “We've elected a meme as President” was one of the many ecstatic pronouncements by 4channers on November 9. These were the people who had earlier in the year turned Microsoft's fun millennial AI bot, Tay, into a genocidal racist by teaching it to spew out anti-Semitic remarks.

One widely recycled fake story claimed that the Democrats were running a child-sex ring in the basement of a pizza parlour, Planet Ping Pong, in Washington DC. “Pizzagate: how 4chan uncovered the sick world of Washington's occult elite”, ran one of the headlines as the story spread to the message boards of Reddit. Alex Jones of the alt-right video website Infowars recycled claims that Hillary Clinton was a murderer. Fantasy collided with reality when a 28-year-old conspiracy theorist, Edgar Welch, armed himself with an assault rifle and burst into Planet Ping Pong shooting first and asking questions later. Pizzagate's violent conclusion just added to the “lulz” – as 4channers call the fun they derive from trolling the “libtards” and “cucks” of the established media. Nihilism went viral in 2016.

Britain's collision with right-wing fantasy happened outside the public library in Birstall, West Yorkshire, on June 16. One of Labour's brightest young MPs, Jo Cox, was shot and stabbed to death by a local man, Thomas Mair, who cried “Britain First” as he was led away by police. He was, by all accounts, a rather quiet individual who had been seduced into the far right and believed he was helping the cause of Brexit. Remainers confidently believed that the atrocity would do precisely the reverse. (Imagine the impact on the Scottish independence referendum if a woman MP had been murdered by an assailant crying “Scotland First” on the eve of poll). But the “liberal” media was confounded: a week after Jo Cox died in a pool of blood, Britain voted to leave the European Union.

Nigel Farage, regarded by many as the killer clown of Brexit, was ecstatic. In the early hours he hailed the vote, with unintentional irony, as “independence day ... without a shot being fired”. Days before, Farage had paraded before the fake news poster claiming that Britain was at “breaking point” because of immigration. The brown-faced migrants depicted were in reality refugees waiting at a border crossing in Eastern Europe. They weren't EU nationals and therefore had no rights to enter Britain, unless they were granted asylum – which has nothing to do with Brexit.

To be fair, the fakery wasn't only on the Brexit side. The UK chancellor, George Osborne, recycled some of the Project Fear nonsense from the Scottish referendum claiming that Britons would be £4,300 poorer after Brexit. Public spending would be slashed, house prices would collapse, businesses would leave and trade would stop dead. Voters were right to be sceptical of much of the over-wrought propaganda of the Remainians.

Nevertheless, there was an essential truth to Remain's warning: leaving the European Union, the destination of 40 per cent of British exports, without any coherent alternative, was an act of stupendous folly. The comic-opera Brexiteers persuaded themselves, all evidence to the contrary, that Europe is going to roll over and give the UK preferential trade deals. The year 2017 promises to be the mother of all reality checks on Brexinomics.

“Taking back control of our borders” wasn't really about trade of course – it was more about culture and its dilution by mass migration. Brexit was a cry of pain from dispossessed and depressed areas in the north of England who felt left behind by globalisation and cultural diversity. As with red-state Trump supporters in America, the white working-class voters who follow Nigel Farage's Ukip did so, not because they believed that jobs would return after Brexit, but largely for emotional reasons – the need to feel recognised in a society that seemed to no longer regard the indigenous white working class as worthy.

It's true that the liberal left has sometimes sounded as if it is only interested in black lives, LBGT lives, middle-class women's lives. Identity politics has diverted attention from the enduring class divisions in society, which are about wealth and power, not race or gender. However, the tragedy of Brexit, as with Trump, is that these working-class voters have invested their hopes in nationalist demagogues who have no real intention of furthering their interests. Donald Trump railed against “Wall Street” and claimed Hillary Clinton was in the pockets of “Goldman Sachs”, yet he has filled his cabinet with the very same people. His promises to bring jobs to the American rust belt are as likely to be honoured as his bid to get Mexico to pay for his wall. His tax cuts will benefit the very corporations and wealthy individuals he said were ripping off middle America.

Brexit and white nativism are, like anti-Semitism, the “socialism of fools”. The downtrodden in Ohio and the bleak housing estates of non-metropolitan England have fallen for the biggest and oldest lie of them all: that in some way other disadvantaged groups, like immigrants, are the cause of their problems. That economic nationalism will halt the march of global capitalism. Trump and Brexit voters aren't bad people: they love their families and generally hold no personal grudge against people of colour. But their political choices are liable to propel the world towards chaos and division.

If 2016 was all about the revolt against liberalism, 2017 will be about disillusion with populism. The jobs are not coming back. Donald Trump's America will sink into neurotic isolationism. The bluster and bigotry of their emotionally unstable President will leave a trail of diplomatic confusion and needless confrontation across the world. His brittle vanity is easily exploited by authoritarian leaders of like mind. His love affair with the authoritarian Russian president Vladimir Putin has all the sinister appeal of The Joker and Lex Luthor teaming up in a Batman movie.

The UK will try to ingratiate itself with the White House in the hope that a state visit and a banquet with the Queen will put Britain into "most favoured nation" status for US trade. Scotland will brace itself for the prospect of The Donald visiting his Scottish golf courses and taking the opportunity to humiliate Alex Salmond and Nicola Sturgeon. Meanwhile Theresa May will be forced, not least by the expected Supreme Court ruling, to come to Parliament and explain her plan for Britain after Article 50, which she is pledged to enact in March.

The divisions in the UK Conservative Party and Government are likely to come spilling out as the confused and contradictory ambitions of her Brexit ministers are finally exposed. This will present an opportunity for Labour, which it will probably fail to grasp. Even many of his own supporters are now coming to realise that Jeremy Corbyn, for all his personal virtues, lacks the killer instinct required of a successful opposition leader in an adversarial parliament. He will increasingly appear as an elder statesman as more ambitious figures like Keir Starmer, Emily Thornberry and John McDonnell jostle for the stage.

Nicola Sturgeon's attempts to keep Scotland in the European Single Market, as the rest of the UK leaves it, have already been dismissed by the UK Government. Scotland is to remain a kind of hostage to the ambitions of little Britain. But as the wheels come off the Brexit bus, the Scottish Government will be an important focus of opposition to British isolationism. In Holyrood, attention will shift from blocking Article 50 to limiting the damage. Non-Tory MSPs will be wise to join with the First Minister, seeking to ensure that Holyrood acquires those powers over agriculture, fisheries, environment and immigration that were promised by the Brexiteers before the referendum,

The prospects of another Scottish independence referendum in 2017 are diminishing, not least because the First Minister has shown no signs of wanting to stage one. However, the world is moving into a new era of instability and uncertainty. It is not inconceivable that events will conspire to shift opinion in Scotland dramatically. As the reality of “red, white and blue” Brexit become apparent, Scots might decide they are better off out of it.

However, Europe itself faces a year of living dangerously. The greatest challenge is from the populist Marine Le Pen in the French presidential elections as she seeks to follow Brexit with Frexit. Right-wing parties are installing themselves in governing coalitions in “Nordic” countries like Denmark and Finland. Beppe Grillo's Five Star movement is on the march in Italy after it led the successful opposition to December's constitutional referendum. We may not be heading back to the 1930s and militia-based fascism, but populism is certainly on the march. Send in the clowns? Don't bother, they're here.