THE ECONOMIST today endorses Barack Obama for president. As a review of our past endorsements shows, the newspaper’s (and this blog’s) favour should not have been taken for granted. When we have chosen to endorse, we have tilted for both Republicans and Democrats. And despite the largely disappointing general election campaign, we find a lot to admire in both candidates. John McCain in particular has shown courage in the past sticking to unpopular but sensible positions on things like free trade and immigration reform.

But what happened in this campaign cannot be ignored, either. From our leader:

The Candidate McCain of the past six months has too often seemed the victim of political sorcery, his good features magically inverted, his bad ones exaggerated. The fiscal conservative who once tackled Mr Bush over his unaffordable tax cuts now proposes not just to keep the cuts, but to deepen them. The man who denounced the religious right as “agents of intolerance” now embraces theocratic culture warriors. The campaigner against ethanol subsidies (who had a better record on global warming than most Democrats) came out in favour of a petrol-tax holiday. It has not all disappeared: his support for free trade has never wavered. Yet rather than heading towards the centre after he won the nomination, Mr McCain moved to the right. Meanwhile his temperament, always perhaps his weak spot, has been found wanting. Sometimes the seat-of-the-pants method still works: his gut reaction over Georgia—to warn Russia off immediately—was the right one. Yet on the great issue of the campaign, the financial crisis, he has seemed all at sea, emitting panic and indecision. Mr McCain has never been particularly interested in economics, but, unlike Mr Obama, he has made little effort to catch up or to bring in good advisers (Doug Holtz-Eakin being the impressive exception). The choice of Sarah Palin epitomised the sloppiness. It is not just that she is an unconvincing stand-in, nor even that she seems to have been chosen partly for her views on divisive social issues, notably abortion. Mr McCain made his most important appointment having met her just twice.

Mr Obama, on the other hand, has run his campaign brilliantly, and that does matter.

It is not just that he has more than held his own against Mr McCain in the debates. A man who started with no money and few supporters has out-thought, out-organised and outfought the two mightiest machines in American politics—the Clintons and the conservative right. Political fire, far from rattling Mr Obama, seems to bring out the best in him: the furore about his (admittedly ghastly) preacher prompted one of the most thoughtful speeches of the campaign. On the financial crisis his performance has been as assured as Mr McCain’s has been febrile. He seems a quick learner and has built up an impressive team of advisers, drawing in seasoned hands like Paul Volcker, Robert Rubin and Larry Summers. Of course, Mr Obama will make mistakes; but this is a man who listens, learns and manages well.

Of course, Mr Obama isn’t perfect. A vote for Mr Obama is still a risk, if a calculated one.

Our main doubts about Mr Obama have to do with the damage a muddle-headed Democratic Congress might try to do to the economy. Despite the protectionist rhetoric that still sometimes seeps into his speeches, Mr Obama would not sponsor a China-bashing bill. But what happens if one appears out of Congress? Worryingly, he has a poor record of defying his party’s baronies, especially the unions... The risk remains that on economic matters the centre that Mr Obama moves to would be that of his party, not that of the country as a whole. So Mr Obama in that respect is a gamble. But the same goes for Mr McCain on at least as many counts, not least the possibility of President Palin. And this cannot be another election where the choice is based merely on fear. In terms of painting a brighter future for America and the world, Mr Obama has produced the more compelling and detailed portrait. He has campaigned with more style, intelligence and discipline than his opponent. Whether he can fulfil his immense potential remains to be seen. But Mr Obama deserves the presidency.

And, by the way, he will probably get it. Here’s to hoping Mr Obama’s moderate and sensible side wins over his primary-season, protectionist-populist side.

(Photo credit: AFP)