When John McCain chose Sarah Palin to be his running mate, his supporters declared the move a masterstroke. But Republican poll ratings have been falling day by day - and now the 'Troopergate' scandal has turned the Hockey Mom from Alaska into a liability for a campaign that has lost its way. Paul Harris reports

Nothing typifies the plight of John McCain's campaign more than the rollercoaster ride of his surprise vice-presidential pick, Sarah Palin. In six weeks, she has gone from disaster to triumph and back again several times.

Originally greeted with disbelief after her candidacy was announced on the eve of the Republican National Convention in St Paul, Minnesota, Palin wowed the party with her stunning debut speech. For a while it seemed that the self-described 'pitbull in lipstick' would be the surprise ingredient in the race.

Palin electrified voters, taking McCain ahead of Barack Obama in the polls and bringing in legions of undecided women. The Obama campaign floundered as it tried to come to terms with a phenomenon so novel that the old game-plans had to be torn up. In teaming up with a political ingenue with grassroots appeal, McCain had taken a terrific risk. And it appeared to have paid off.

Then came Katie Couric. The network TV anchor did not so much grill Palin as give the Alaska governor enough rope to hang herself. Palin floundered against even the most harmless questions, such as what newspapers she read, and became the butt of jokes on Saturday Night Live. Satirists competed to offer the best impression of her bumbling incoherence. But then Palin surprised everyone again with a strong performance in her debate against Senator Joe Biden, resurrecting her supporters' belief that she could change the campaign.

That hope has probably died with the Troopergate report. The enormous microscope of a presidential campaign has magnified an obscure staffing dispute in Alaska - over whether Palin pursued a family vendetta against state trooper Mike Wooten - into a major political story. With the release of a damaging report this weekend that concluded Palin did abuse the powers of her office, her political trajectory has once again changed course. Gone are the dreams of Palin bringing in the desperately needed independent voters, former Hillary Clinton supporters and soft Democrats the McCain campaign need so much. Instead she has now been firmly assigned to the traditional role of the vice-presidential candidate: attack dog.

It is a role she does well and it plays to the Republican base. There is still no doubting that Palin can powerfully move a Republican crowd. Her angry attacks on Obama stir supporters far more effectively than does McCain's more measured style. But she is now largely reduced to stumping in the rural Republican heartlands of America. She is a powerful tool in working up the party base, ensuring that they turn out on election day, but her crossover appeal has gone. Indeed, even Republican critics of Palin have been stamped on for questioning her. Several high-profile conservative writers - such as David Brooks in the New York Times and Kathleen Parker in the National Review - have poured scorn on her. Brooks even called her 'a fatal cancer on the Republican party'.

But the response among the base was instant and brutal. Parker received no fewer than 12,000 outraged emails, including some wishing she had been aborted, after writing that Palin should step down. There seems little doubt that Palin is still the darling of a huge section of red state America. But what works for the Republican base no longer works for the country as a whole.

Attack dogs do not win the middle ground, especially ones beset by scandal and smarting from the damning judgment of Alaska state investigator Steve Branchflower, who discovered that Todd, Palin's husband, enjoyed extraordinary access to his wife's closest advisers, despite being unelected and having no salaried state post. He then used that access to try to get Wooten fired, the report found. Palin was criticised for taking no action to rein in her husband and Branchflower concluded there was evidence that she participated in the campaign against Wooten.

The report states: 'The evidence supports the conclusion that Governor Palin, at the least, engaged in "official action" by her inaction, if not her active participation or assistance, to her husband in attempting to get Trooper Wooten fired (and there is evidence of her active participation).

'She knowingly ... permitted Todd Palin to use the governor's office and the resources of the governor's office, including access to state employees, to continue to contact subordinate state employees in an effort to find some way to get Trooper Wooten fired.'

It adds that Palin's actions created 'conflicts of interests for subordinate employees who must choose to either please a superior or run the risk of facing that superior's displeasure and the possible consequences of that displeasure'. In sum, Palin breached a code of conduct for state officials that 'each public officer holds office as a public trust, and any effort to benefit a personal or financial interest through official action is a violation of that trust'. Not an ideal verdict for a vice-presidential candidate 23 days from the election.

Troopergate has come as a body-blow to a campaign that was already on a losing streak. All last week, as the polls showed Obama pulling away, the atmosphere at McCain rallies had become angrier and angrier. In Wisconsin, one irate supporter, taking the microphone, urged his chosen candidate on the stage to do something - anything - to beat Obama. 'I am begging you, sir. I am begging you. Take it to him!' implored James Harris, a local radio host, as the crowd clapped and applauded. His mantra was picked up by other speakers. 'I'm mad! I'm really mad!' said another man, who refused to let go of the mic and whose furious rant was then broadcast on the nation's TV screens and the internet.

Fury has become the dominant theme. As the poll numbers have worsened, Republican supporters seem to have reacted with a mixture of disbelief and anger. At rally after rally, from Florida to Ohio to Wisconsin, supporters have urged their campaign to fight harder.

Mention of Obama's name prompts cries of 'traitor', 'treason' and 'kill him'. Members of the press, universally suspected of Democratic sympathies, are targeted and insulted. At one rally in the South a black network TV cameraman was racially abused by a McCain supporter and told: 'Sit down, boy.'

Inside the Obama camp, and increasingly among Republican insiders, there is a growing feeling: this is what losing campaigns look like. In the wake of Troopergate, such a conclusion is hard to resist, even though there are more than three weeks of electioneering ahead. After months of holding on against what seemed impossible odds, McCain's chances of keeping the White House in Republican hands are sinking fast.

The wheels are coming off his campaign as the key states of Florida, Ohio and Pennsylvania all swing firmly towards Obama. In fact, the electoral battleground has become the Republican turf of Virginia, North Carolina and Indiana. One national poll late last week put Obama a huge 11 points clear of McCain.

The deep-seated reasons why McCain's campaign has been swept aside can be found in the gravity of the economic crisis and the legacy of President George W Bush, who is leaving after eight years in office with a popularity rate so disastrous that it compares only to Richard Nixon's. But the Palin fall-out promises to be damaging because Troopergate is an embarrassment that is entirely self-inflicted. The stunning, quixotic choice of Palin had seemed to give McCain a remarkable chance of success. But after the dreadful rollout to the national media and now 'Troopergate' , Palin has gone from saviour to liability with a swiftness that has amazed even watchers of her meteoric career rise. Perhaps the one thing the campaign has going for it is that it knows it is in trouble. McCain, always a realist, is being frank about the realities of his plight. 'I'm the underdog. I've always been the underdog from the beginning,' he told a television interviewer late last week.

What now? Yesterday, the McCain team were engaged in a desperate damage limitation exercise, rubbishing the Branchflower report as an exercise in partisan politics. Nevertheless, the Alaskan mud is likely to stick.

McCain's biggest problem is still the sheer scale of the economic crisis. The collapsing stock market, economic bail-out and banks going bust has shocked the American electorate. It wiped out any other issue and focused the entire election on the traditional Democratic territory of the economy. Neither is that likely to change any time soon.

McCain must also overcome the fact that Americans increasingly blame their problems on Bush and eight years of Republican rule. Though McCain has tried to co-opt Obama's image of change and fighting the current administration, it is a tough trick to pull off.

The fact is the electorate desperately wants change and faces a choice between a Republican veteran who would be one of America's oldest presidents and a young, fresh-faced Democrat who would be the first black politician to sit in the Oval Office. Given that stark choice, the change mantle is hard to yank from Obama's shoulders.

That has seemingly left only one line of attack: going negative. In the past week, as newspaper headlines around America have reported the worst week in Wall Street's history, McCain's campaign has relentlessly touted the name of Bill Ayers. The 1960s radical was a member of the Weather Underground, an urban terrorist group that bombed government targets. He is now, however, a university lecturer in Chicago, with minor links to Obama.

But it is possible that the attacks using Ayers are but the prelude to a more ominous main event. Despite urging from some quarters within his campaign, McCain has not yet himself raised the issue of Obama's former pastor, the Rev Jeremiah Wright. McCain is believed to have termed the issue off-limits so far, even though news of Wright's incendiary sermons, condemning America as a racist society and blaming Aids on government, almost derailed Obama's candidacy when they first emerged.

But, as the November election gets closer and closer, and if the polls do not shift, McCain may be tempted to let the Wright issue loose. He is already facing pressure from Palin to do just that. In an interview with conservative columnist Bill Kristol, Palin urged her running mate to bring the Wright issue out of the box. 'I don't know why that association isn't discussed more ... but, you know, I guess that would be a John McCain call on whether he wants to bring that up,' she said.

That interview of course, took place before the Branchflower report. Now Palin may find that the attack dogs are chasing her.