AP

JOHN MCCAIN likes to style himself as a successor to a Republican president from a century ago: Teddy Roosevelt. Like Mr Roosevelt, Mr McCain presents himself as a tough type not afraid to wield American power abroad. He is also ready to use the presidency at home as a “bully pulpit”—a term coined by Mr Roosevelt—even against big business when needed. Roosevelt built the Wildlife Refuge system and created huge national parks and forests; Mr McCain fancies himself green and wants to cap greenhouse-gas emissions.

But whereas Roosevelt is widely considered to have been one of the great presidents, many modern conservative types are troubled by Mr McCain. The anti-government wing of the party that was launched to its forefront by Barry Goldwater in 1964, championed by Ronald Reagan, and then dispirited by eight years of George Bush is worried by Mr McCain. Could some of these voters defect to the Libertarian Party this year?

The question is less fanciful than usual. The Libertarians, now deciding who should be their presidential nominee, are usually a sideshow. Their last candidate, Michael Badnarik, took a third of a percentage point in 2004. The hopefuls this year include one who wants to move the United Nations headquarters to Somalia, one known mostly for a book about the spirituality of John Denver, a country singer, and a near-obsessive marijuana-legalisation advocate.

But this year the Libertarian nomination may be a bigger prize. Ron Paul ran a lower-case libertarian campaign for the Republican nomination, generating surprising levels of enthusiasm, votes and money. Paulites continue showing up and voting for him in primaries, despite the fact that Mr McCain has locked up the nomination. The word “libertarian” has, in the wake of that run, gained more currency and respectability.

And now Bob Barr, a prominent former Republican Congressman, is campaigning for the nomination. Mr Barr, a former anti-drug warrior and leader of the impeachment against Bill Clinton, has converted to a rightish branch of Libertarianism. His biggest worry is the expansion of federal powers since September 11th, 2001. He wants to abolish the Justice Department. He would defer to states on gay marriage and drug legalisation.

Could this be bad news for Mr McCain? Mr Barr may not get the nomination—many Libertarians may prefer someone with more years in the party—but if he does, Mr McCain should be wary. Even worse would be if Mr Paul endorsed Mr Barr (Mr Paul himself sought the Libertarian nomination in the past). As in previous elections, 2008 will be decided by close votes in a few swing states. Orthodox Republicans are dispirited by Mr McCain's heterodoxies on immigration, global warming, taxes and other issues. They are reluctantly coalescing around him, on the basis that he is more appealing than Barack Obama.

But just enough demoralised Republicans might pull the lever for Mr Barr in states with an ornery, independent streak to give Mr McCain some heartburn. Mr Barr explicitly says that he is not running as a spoiler and would take votes from Mr Obama (from those worried, for example, about civil liberties). But the general wisdom is that he would take far more from Mr McCain. Some are already calling him Mr McCain's Ralph Nader, the man who took enough votes from Al Gore to let Mr Bush become president in 2000.

Even if Mr Barr is not nominated, the fact that people are even speculating about a libertarian spoiler is a reflection of the challenges faced by Mr McCain. He has a vaunted personal story and a likeable personality, but he is hemmed in ideologically. On his signature issue, Iraq, he is a hostage to fortune. At home the more he shows his independence from Republican orthodoxy, the more traditional Republicans might stay away from the polling booth. The more he courts the Republican base, the more he risks being associated with Mr Bush. The last thing he needs is an irksome Libertarian stealing his small-government credibility too.