For a US presidential candidate, there is nothing better than a rocking anthem to pump up the crowds and project the sort of imagery that could help win the keys to the White House.

The Republican hopeful John McCain may be pushing 72, but his "town hall" events can be as noisy as the stadiums where Barack Obama appears on stage to the strains of U2's "Beautiful Day." But the McCain camp is having trouble settling on a suitable campaign anthem. After searching for months, it finally picked "Johnny B Goode" – Chuck Berry's rock 'n' roll classic from 1958. The high-power guitar licks and "Go, Johnny, go" chorus put a spring in Mr McCain's step. When asked why he chose it, he quipped: "It might be because it is the only one [the artist] hasn't complained about us using."

Berry, 81, may not have complained about his song being appropriated by Mr McCain, but he has made it clear he would prefer Barack Obama in the White House. "America has finally come to this point where you can pick a man of colour and that not be a drawback," Berry said. "It's no question, myself being a man of colour. I mean, you have to feel good about it."

Download the new Independent Premium app Sharing the full story, not just the headlines

The anointment of Mr Obama as the Democratic presidential candidate was, he added, "definitely a proud and successful moment for all the people of this country – not just black people, but Americans in general".

Berry, known as the "father of rock 'n' roll", recounted: "In the Fifties there were certain places we couldn't ride on the bus, and now there is a possibility of a black man being in White House." "Free at last, free at last, thank God Almighty, free at last," he added, quoting Martin Luther King.

There was a groan at McCain headquarters as it suffered yet another musical derailment. An attempt to use Abba's "Take A Chance On Me" also bombed. "We played it a couple times and it's my understanding [Abba] went berserk," Mr McCain said.

Mr McCain is not the first political candidate to stumble into a musical minefield, only to discover their theme song is not what was originally imagined. Objections often come in the form of letters to "cease and desist" by offended songwriters or musicians. Sometimes the lyrics are discovered to be off message. The McCain team had earlier alighted on John Cougar Mellencamp's "Pink Houses". The Mellencamp back-story as a hard-living rocker who had cleaned up his act seemed to perfectly project Mr McCain's maverick image as a rule-breaking but deeply conservative sonofabitch.

That scenario went into meltdown when aides realised Mellencamp is a Democrat activist who supported the presidential contender John Edwards, even appearing with him on the campaign trail. Mellencamp asked Mr McCain to cease and desist. Not only that, but "Pink Houses" is a song about missed opportunities and wasted potential, so the lyrics are not exactly on-message for a presidential campaign.

Mr McCain then used the theme from Rocky after the head of MGM, a McCain backer, gave his approval. But MGM did not own the rights to the track.

Republicans seem to have a tin ear for music. For a while in 2004, George Bush's re-election theme was the rock standard "Still The One". However, it turned out that the songwriter John Hall was an environmental activist who had been campaigning against nuclear power since 1979.

David Cameron will have some sympathy with Mr McCain. The Tory leader recently incurred the wrath of Paul Weller for expressing his liking for The Jam's song "Eton Rifles".