In an era when many question the validity of their elected officials, Jo Cox stood out. She rose to represent the area in which she was born. And she arrived at the Commons with hinterland, a career campaigning for Oxfam, Save the Children and the NSPCC. On Thursday, shock among MPs was palpable.

This attack on a public official cannot be viewed in isolation. It occurs against a backdrop of an ugly public mood in which we have been told to despise the political class, to distrust those who serve, to dehumanise those with whom we do not readily identify.

The Guardian view on Jo Cox: an attack on humanity, idealism and democracy | Editorial Read more

There are many decent people involved in the campaign to secure Britain’s withdrawal from the EU, many who respect the referendum as the exercise in democracy that it is. But there are others whose recklessness has been open and shocking. I believe they bear responsibility, not for the attack itself, but for the current mood: for the inflammatory language, for the finger-jabbing, the dogwhistling and the overt racism.

It’s been part of a noxious brew, with a dangerous anti-politics and anti-MP stereotypes fomented by leave and their media backers mixed in. Only an hour before this shooting Nigel Farage unveiled a huge poster showing Syrian refugees fleeing to Slovenia last year, nothing to do with EU free movement – and none arriving here. Leave’s poster read: “Breaking Point. We must break free from the EU and take control of our borders.” Nicola Sturgeon, Caroline Lucas and many others condemned it as “disgusting”, and so it is.

At a ward meeting this week my local Labour councillor in Camden, north London, showed us a sign that had been left on a member’s car windscreen. The car had a remain poster on it and was parked round the corner from where I live. This is what the message said, printed in capitals (I’ve left the original spelling): “This is a lave [leave] area. We hate the foriner. Nex time do not park your car with remain sign on. Hi Hitler. White Power” – accompanied by racist symbols. The car’s owner had passed it on to the police.

Rude, crude, Nazi-style extremism is mercifully rare. But the leavers have lifted several stones. How recklessly the decades of careful work and anti-racist laws to make those sentiments unacceptable have been overturned.

This campaign has stirred up anti-migrant sentiment that used to be confined to the far fringes of British politics

This campaign has stirred up anti-migrant sentiment that used to be confined to outbursts from the far fringes of British politics. The justice minister, Michael Gove, and the leader of the house, Chris Grayling – together with former London mayor Boris Johnson – have allied themselves to divisive anti-foreigner sentiment ramped up to a level unprecedented in our lifetime. Ted Heath expelled Enoch Powell from the Tory front ranks for it. Gove and Grayling remain in the cabinet.

When politicians from a mainstream party use immigration as their main weapon in a hotly fought campaign, they unleash something dark and hateful that in all countries always lurks not far beneath the surface.

Did we delude ourselves we were a tolerant country – or can we still save our better selves? Over recent years, struggling to identify “Britishness”, to connect with a natural patriotic love of country that citizens have every right to feel, politicians floundering for a British identity reach for the reassuring idea that this cradle of democracy is blessed with some special civility.

But if the vote is out, then out goes that impression of what kind of country we are. Around the world we will be seen as the island that cut itself off as a result of anti-foreigner feeling: that will identify us globally more than any other attribute. Our image, our reality, will change overnight.

Nigel Farage attacked for Ukip poster showing queue of refugees Read more

Contempt for politics is dangerous and contagious, yet it has become a widespread default sneer. There was Jo Cox, a dedicated MP, going about her business, doing what good MPs do, making herself available to any constituents with any problems to drop in to her surgery. Just why she became the victim of such a vicious attack, we may learn eventually. But in the aftermath of her death, there are truths of which we should remind ourselves right now.

Democracy is precious and precarious. It relies on a degree of respect for the opinions of others, soliciting support for political ideas without stirring up undue savagery and hatred against opponents. “Elites” are under attack in an anarchic way, when the “elite” justice minister can call on his supporters to ignore all experts.

Something close to a chilling culture war is breaking out in Britain, a divide deeper than I have ever known, as I listen to the anger aroused by this referendum campaign. The air is corrosive, it has been rendered so. One can register shock at what has happened, but not complete surprise.

• This article was amended on 20 June 2016. An earlier version said Oswald Mosley was ejected from the Labour party for anti-foreigner sentiment. Mosley was in fact expelled for his “act of gross disloyalty” in setting up the New Party.