“The trouble with Hillary,” said a fellow watcher of Clinton’s second debate with Donald Trump, “is that she comes across as the liberal consensus personified.” Exactly so, and anti-liberalism is one of the threads that connects Trumpism, the Brexit vote, Poland’s nationalist populist government, Putinism and much else.

We liberal internationalists need to keep taking apart the mendacious, demagogic claims of anti-liberal populists such as Trump, Nigel Farage and Poland’s former prime minister Jarosław Kaczyński. This should not, however, prevent us coming to an honest reckoning about the shortcomings of the version of liberalism that, over the past quarter-century, came packaged with globalisation.

Those to whom populists appeal have a mixture of economic, social and cultural grievances about the consequences of free-market liberal globalisation. Of course the mix varies from country to country, but they also have much in common. Economically, they have often lost out, or at least not benefited as much as others. Their incomes have stagnated or declined, while jobs have gone to India or China (where, it’s important to note, many hundred millions of beneficiaries from globalisation are to be found), sometimes to immigrants prepared to work for less money, to younger people better able to adapt in a rapidly changing economy, and to machines in a period of unprecedented digital automation.

Socially, they see, just up the road, in the richer parts of their town or country, and on their TV screens, people who have done spectacularly well while they have been struggling. Bankers who crashed the western financial capitalist economy, by creating what Alan Greenspan’s biographer Sebastian Mallaby recently called “this mad system that blew up”, have for the most part come away with their fortunes untouched. It’s the rich who get the pleasure, it’s the poor who take the pain.

Reflecting on a book about top bankers, Francis Fukuyama says: “One of the really big issues … is whether we are actually living in a kind of oligarchy of the sort we attribute to places like Russia or Kazakhstan.” That’s Fukuyama talking, not Karl Marx. The worst of these bankers amply deserve the label “basket of deplorables”, which Clinton so ill-advisedly applied to “half” of Trump’s supporters.

Culturally, the left-behind say, “I don’t recognise my country any more.” That phrase embraces the impact of immigration, the spread of social liberalism and the sheer pace of change all around them. There is a strong temptation to blame it on the Other. In France, the finger is pointed at Muslims. So women must take off their burkinis, while the shameless Nicolas Sarkozy tries to steal Marine Le Pen’s xenophobic thunder.

In Poland, the populists demonise Muslim refugees nobody has actually met because the government has refused to take in more than a handful of them, and liberal, decadent western notions about a woman’s right to choose, gay partnerships and “gender”.

In Britain, for further contrast, it’s the Poles themselves who are the target of white working-class anger. When canvassing for Britain to remain in the EU, I also met several Asian British people who complained about the wave of eastern European immigrants. So here the “bloody foreigners” are white, Christian Europeans, while the people complaining about them are sometimes Muslims. In the United States, the white identity politics of Trumpism is directed against Mexicans as much as Muslims. But always there is some Other.

Populists channel these widespread grievances into paranoid paths. But the grievances nonetheless have a foundation in reality and it behoves us to recognise that the causes do lie, at least in part, in free-market, globalised liberal capitalism as it has developed since its historical triumph in 1989.

Yes, this is the world we liberal internationalists built – even if we didn’t all have our own hands in the bankers’ till. Although Eurosceptics habitually denounce the EU as bureaucratic, dirigiste, étatiste and all other Franco-Belgian horrors, actually the economic, social and cultural causes of the Brexit vote lie more on the other side of the union’s Janus face: the European commission as motor of liberalisation and globalisation, bringing down barriers.

Remember that the EU’s foundational “four freedoms” are not Franklin D Roosevelt’s (from want and fear; for religion and speech), but free movement of capital, goods, services and people. The free trade agreements denounced by Trump are part of the same international tapestry. As has often been pointed out, early 21st-century globalisation recalls a famous passage in Karl Marx’s Communist Manifesto: “The need for a constantly expanding market for its products chases the bourgeoisie over the entire surface of the globe. It must nestle everywhere, settle everywhere, establish connections everywhere.”

But now, instead of “workers of all countries, unite!” the battle cry is “populists of all countries, unite – against one another!” If these populist nationalist counter-revolutions are to be averted, what should liberals do?

Implement timely reform, of course. “Inclusive growth” is the slogan of one of the more successful liberal politicians in today’s world, Canada’s Justin Trudeau. “An economy that works for everyone,” says Clinton. But how?

As the German historian Jürgen Kocka reminds us in his short history of capitalism, this economic system has an inherent tendency to plunge into crisis, often starting with financial crises “as in 1873, 1929–30 and 2007–08”, but then impacting on the welfare of broad sectors of the population and leading to social and political turmoil. This effect is particularly acute because of what Kocka calls “capitalism’s current phase of financialisation”. As he also points out, markets have always depended on a framework that only politics can provide – government and law at home, international order abroad.

As we are now seeing with the run on the pound, national sovereignty is only as effective as currency and bond markets allow. And this is a world of giant supranational corporate octopuses that would have Marx rubbing his hands with schadenfreude.

Banks move billions around at the click of a mouse. Bankers, along with Russian and Chinese oligarchs, salt away their ill-gotten gains using the services of Panamanian lawyers. In a conjuring trick worthy of Houdini, Apple seems to have ended up paying tax on much of its European profit in a place called Erehwon. In 2014, Facebook paid just £4,327 in UK tax. No single state can hold down these giant octopuses.

And so we come to a final twist. It’s not just that conservatives such as Theresa May are looking to a larger role for the state to save liberal capitalism from the anger the Brexit vote revealed. It’s that effectively addressing the cross-border effects of globalised liberal capitalism will actually require more international cooperation, at the very moment when populist nationalists are leading so many countries in the opposite direction. To remedy the unintended consequences of globalisation we need more liberal internationalism, not less.