As if there were not enough real enemies to fight, the United States has been at war with itself in recent years. They call it the culture war. It has generated more hot air than most real wars in history. John McCain has now turned to its red army tactics to rescue himself from impending defeat - and Sarah Palin is his Katyusha.

"There is a religious war going on in our country for the soul of America," declared the conservative nationalist Pat Buchanan at the Republican national convention in 1992. "It is a cultural war, as critical to the kind of nation we will one day be as was the cold war itself." Later that year he explained that "the Bosnia of the cultural war is abortion". As Buchanan foresaw, this has been a war for power: not military power, but the kind that comes from shaping the norms, beliefs and values by which people live, and the meanings attached to words like liberalism, patriotism or, indeed, culture. The two sides in this war came to be labelled red and blue, after the colouring of Republican and Democratic states on electoral maps.

No one has generated more hot air in this cause than Fox News anchor Bill O'Reilly, who in 2006 published a book proudly called Culture Warrior. He describes the culture war as a battle between traditionalists ("T-Warriors") like himself and "the committed forces of the secular-progressive movement that want to change America dramatically: mold it in the image of western Europe". Like Europe! God, how horrible.

O'Reilly labels these secular-progressive forces "S-P", and identifies George Soros as "El Jefe of the S-P forces". In a fashion disturbingly familiar to any student of the 20th century, he illustrates this passage with an unflattering photo of the financier-philanthropist, captioned "George Soros, S-P Jefe, puppet master, and moneyman". "Born George Schwartz to a Jewish family in Hungary in 1930," he explains, "Soros assumed the identity of a gentile boy when the Nazis invaded at the start of world war II." This is what they call a Fox Fact. (It was Soros's father who changed the family name in 1936 and the Nazis did not invade Hungary until 1944: three errors in the space of one innuendo.) Anyway, what should that personal history have to do with an argument about cultural and social policies in 21st-century America?

Excoriating "leftwing outfits like the Canadian Broadcasting Corporation and the British Broadcasting Company" (Foxy Fact-checking again: it's the British Broadcasting Corporation), O'Reilly pounds the hot buttons of the culture war with a ham fist: abortion, drugs, gay marriage, not celebrating Christmas, atheism, the liberal or - as he prefers - "S-P" media and elites. The New York Times, he says in an afterword to the paperback edition, has "morphed into a brochure for secular-progressive causes". And so it goes on. And on.

Does this matter? Over the past decade it has mattered a lot. The framing of the political debate in cultural conservative terms - a counter-revolution against the cultural revolution of 1968 - contributed significantly to George Bush's election victories in 2000 and 2004. And one way of understanding the direction taken by the McCain campaign over the past few weeks is this: only the culture war can win it for us now. On Iraq, we lose. On the economy, we lose. But by caricaturing the liberal otherness of a candidate called Barack Obama, perhaps we can snatch victory from the jaws of defeat.

Enter Sarah Palin, the Katyusha rocket of red America. (I trust she won't mind a Russian analogy since, as she has informed us, you - or at least she - can see Russia from Alaska.) The selection of such an obviously under-qualified candidate for vice-president can only be explained by electoral calculation, and that calculation has everything to do with the politics of the country's cultural civil war. Her kind of down-home populist inveighing against Washington elites (add "liberal" or "S-P" according to taste) is part of the well-tried semantic armoury of the red army.

Katyusha Palin now leads the attacks on Obama. This week she has repeatedly tried to tar-and-feather him by association with former terrorist William Ayers. The not-even-subliminal message is: he's not like us, he's like them. The others: elites, liberals, subversives, immigrants and infidels, closet Europeans! Chapter one of O'Reilly's Culture Warrior begins with an imagined 2020 state of the union speech by a president of the United States called Gloria Hernandez: hispanic, and a woman to boot. Worse still, she celebrates the United States as "a diversified nation striving to be at peace with the world". How terrifying. How blood-curdling. Give us President Palin any day.

For Gloria Hernandez read Barack Obama. Or "that one", as McCain disrespectfully referred to him in Tuesday night's presidential debate. At the moment, the tactic isn't working. This election is about the economy, stupid. The pocketbook trumps the prayer book. However much McCain lauds himself as a "maverick", he can't disassociate himself from eight years of Republican rule that are ending in the biggest financial crisis since 1929 and a near-doubling of the national debt. And Obama is better on the economy: clearer, more specific, always bringing it back to the everyday struggles of ordinary Americans. In the instant-reaction polls, a clear majority thought Obama won that debate, as he is winning in most of the polls both nationwide and in key battleground states.

Even if the red-clawed tactics of culture war don't pull Obama down at the last minute, an Obama victory won't spell the end of this war. But perhaps it may spell the beginning of the end. Let's be clear: this war will not finish with a victory of blue over red, or vice versa. It will finish with the accepted, peaceful coexistence in one society of different faiths, value systems and lifestyles - along the lines laid down centuries ago by the classical liberalism of John Locke and others, which so much influenced this country's Founding Fathers. It won't be "liberals" (in the perverted sense in which that word is now used in the United States) trouncing conservatives, but classical liberalism re-made for the 21st century. It won't be blue obliterating red, but red, white and blue - as in Obama's healing promise earlier in this campaign, that there are not red states and blue states, just the United States.

The world needs the United States to get over its cultural civil war, and get over it fast. Not that these moral, cultural and social issues are unimportant. They are among the most important things. But they are also among the most private things. The business of government and the law should be confined to providing a liberal (in the classical sense) framework in which men and women can make personal choices about private goods. That should be only a small part of what government does. By contrast, the central business of government is to provide public goods such as national and personal security, the regulation of markets in which private enterprise can flourish, the international development that is in all our national interests, and a clean environment using diversified, sustainable energy supplies. That's what the United States needs from its new president, and that's what the world needs from the United States.

www.timothygartonash.com