This article is not the first to note the cultural contradiction in American liberalism, but just now the point bears restating. The election may turn on it.

Democrats speak up for the less prosperous; they have well-intentioned policies to help them; they are disturbed by inequality, and want to do something about it. Their concern is real and admirable. The trouble is, they lack respect for the objects of their solicitude. Their sympathy comes mixed with disdain, and even contempt.

Democrats regard their policies as self-evidently in the interests of the US working and middle classes. Yet those wide segments of US society keep helping to elect Republican presidents. How is one to account for this? Are those people idiots? Frankly, yes – or so many liberals are driven to conclude. Either that or bigots, clinging to guns, God and white supremacy; or else pathetic dupes, ever at the disposal of Republican strategists. If they only had the brains to vote in their interests, Democrats think, the party would never be out of power. But again and again, the Republicans tell their lies, and those stupid damned voters buy it.

It is an attitude that a good part of the US media share. The country has conservative media (Fox News, talk radio) as well as liberal media (most of the rest). Curiously, whereas the conservative media know they are conservative, much of the liberal media believe themselves to be neutral.

Their constant support for Democratic views has nothing to do with bias, in their minds, but reflects the fact that Democrats just happen to be right about everything. The result is the same: for much of the media, the fact that Republicans keep winning can only be due to the backwardness of much of the country.

Because it was so unexpected, Sarah Palin’s nomination for the vice-presidency jolted these attitudes to the surface. Ms Palin is a small-town American. It is said that she has only recently acquired a passport. Her husband is a fisherman and production worker. She represents a great slice of the country that the Democrats say they care about – yet her selection induced an apoplectic fit.

For days, the derision poured down from Democratic party talking heads and much of the media too. The idea that “this woman” might be vice-president or even president was literally incomprehensible. The popular liberal comedian Bill Maher, whose act is an endless sneer at the Republican party, noted that John McCain’s case for the presidency was that only he was capable of standing between the US and its enemies, but that should he die he had chosen “this stewardess” to take over. This joke was not – or not only – a complaint about lack of experience. It was also an expression of class disgust. I give Mr Maher credit for daring to say what many Democrats would only insinuate.

Little was known about Ms Palin, but it sufficed for her nomination to be regarded as a kind of insult. Even after her triumph at the Republican convention in St Paul last week, the put-downs continued. Yes, the delivery was all right, but the speech was written by somebody else – as though that is unusual, as though the speechwriter is not the junior partner in the preparation of a speech, and as though just anybody could have raised the roof with that text. Voters in small towns and suburbs, forever mocked and condescended to by metropolitan liberals, are attuned to this disdain. Every four years, many take their revenge.

The irony in 2008 is that the Democratic candidate, despite Republican claims to the contrary, is not an elitist. Barack Obama is an intellectual, but he remembers his history. He can and does connect with ordinary people. His courteous reaction to the Palin nomination was telling. Mrs Palin (and others) found it irresistible to skewer him in St Paul for “saying one thing about [working Americans] in Scranton, and another in San Francisco”. Mr Obama made a bad mistake when he talked about clinging to God and guns, but I am inclined to make allowances: he was speaking to his own political tribe in the native idiom.

The problem in my view is less Mr Obama and more the attitudes of the claque of official and unofficial supporters that surrounds him. The prevailing liberal mindset is what makes the criticisms of Mr Obama’s distance from working Americans stick.

If only the Democrats could contain their sense of entitlement to govern in a rational world, and their consequent distaste for wide swathes of the US electorate, they might gain the unshakeable grip on power they feel they deserve. Winning elections would certainly be easier – and Republicans would have to address themselves more seriously to economic insecurity. But the fathomless cultural complacency of the metropolitan liberal rules this out.

The attitude that expressed itself in response to the Palin nomination is the best weapon in the Republican armoury. Rely on the Democrats to keep it primed. You just have to laugh.

The Palin nomination could still misfire for Mr McCain, but the liberal reaction has made it a huge success so far. To avoid endlessly repeating this mistake, Democrats need to learn some respect.

It will be hard. They will have to develop some regard for the values that the middle of the country expresses when it votes Republican. Religion. Unembarrassed flag-waving patriotism. Freedom to succeed or fail through one’s own efforts. Refusal to be pitied, bossed around or talked down to. And all those other laughable redneck notions that made the United States what it is.