By Laura Smith-Spark
Two decades ago, Douglas Wilder watched as a 9% lead in the polls in the race to be Virginia's governor slipped to just one-tenth of 1% when the ballots were counted.
He still won the election - becoming the first African-American to be elected a US state governor - but the narrowness of his victory led analysts to speculate that he had been a victim of a white hesitancy to vote for a black man.
Are there some people who just cannot bring themselves to vote for an African-American? Yes
Mayor of Richmond, Virginia
The theory goes that some white voters tell opinion pollsters they will vote for a black candidate - but then, in the privacy of the polling booth, put their cross against a white candidate's name.
And the fear among some supporters is that this could happen to Barack Obama on 4 November, when the country votes for its next president.
The phenomenon is known as the Bradley, or Wilder effect.
Tom Bradley was an African-American mayor of Los Angeles who, running for California's governorship in 1982, saw a sizeable eve-of-polling lead evaporate on election day, giving victory to his white rival, Republican George Deukmejian.
In 1989, the year Wilder became governor of Virginia, David Dinkins was elected the first African-American mayor of New York - but he also saw an 18-point lead in the polls shrink to a winning margin of just two points on the day.
Charles Henry, a California professor who was among the first to research the Bradley effect, says Mr Obama would need a double-digit lead to feel confident of victory.
Other pundits have suggested a six- to nine-point cushion may be sufficient. Mr Obama currently has a lead of about this size, according to most polls.
But Mr Wilder, now mayor of Richmond, Virginia, and a supporter of the Obama campaign, told the BBC News website that he believes racism will not have a major impact this time.
"Will there be some effect? Yes. Are there some people who just cannot bring themselves to vote for an African-American? Yes."
But, he said: "America has grown, people have grown."
Controversies over race have cast a shadow over this campaign.
Popular conservative talk-show host Rush Limbaugh has referred to Mr Obama as the "little black man-child" and Fox News has called his wife, Michelle Obama, his "baby-mama".
One Republican senator described Mr Obama as "uppity", a word formerly used to describe blacks who had ideas above their station.
Reports of racist jibes among audiences at some recent McCain rallies led John Lewis, a Democratic congressman from Georgia, to accuse Mr McCain and his running mate Sarah Palin of "sowing the seeds of hatred and division" - a charge they deny.
The surfacing of videos showing Mr Obama's former pastor, the Rev Jeremiah Wright, preaching "God Damn America!" for its treatment of blacks, did nothing to promote the process of racial reconciliation.
Nonetheless, Mr Wilder remains optimistic about Mr Obama's chances for a number of reasons.
"I do think there is going to be a so-called 'reverse Bradley effect' because I think there are some Republicans who won't openly say they are going to vote for Barack Obama, but will," he said.
Mr Wilder was the first African-American to be elected state governor
The 77-year-old puts that down in part to discontent with Republican President George W Bush, with polls suggesting that up to 90% of registered voters believe the country is on the wrong track.
Recent elections do seem to indicate that the Bradley effect could have gone into reverse.
Research by psychologist Anthony Greenwald and political scientist Bethany Albertson of the University of Washington, suggests Mr Obama benefited from a reverse Bradley effect in 12 states during the primary elections, while the Bradley effect itself was noticeable in only three.
A study by Harvard researcher Daniel Hopkins of 133 gubernatorial and senatorial elections from 1989 to 2006 also showed no recent significant Bradley-Wilder effect.
Other polls, meanwhile, suggest that white Americans have steadily become less reluctant to vote for a black person in the last few decades.
A recent Gallup poll suggested that 9% of Americans would be more likely to vote for Mr Obama because of his race, compared with only 6% who said they would be less likely to vote for him.
Mr Wilder also believes Mr Obama is picking his way through the minefield of racial - or post-racial - politics with consummate skill.
He says he gave Mr Obama guidance a year ago - and the Illinois senator seems to have followed it.
John McCain has sought to tone down the rhetoric at campaign rallies
"He never mentions race as such. He doesn't speak to race other than that particular speech, [a speech in March addressing the Jeremiah Wright controversy] in which he did a masterful job," Mr Wilder said.
"He's not running to make history. Is that going to help you [the voter] with your livelihood, pay for your kids' education?"
Mr Wilder also advised Mr Obama not to become too closely allied with longstanding African-American political figures, such as civil rights leaders the Rev Jesse Jackson and Al Sharpton.
The key for Mr Obama now is to continue to present the same message of change to all voters, black and white, Mr Wilder adds, and the American voter will be "smarter" than to fall for last-minute attacks on his character.
"If things stay as they are, with effort and commitment and determination and drive he will win," he said.
"I always say to people, I hope the Wilder effect takes place in this election, because Wilder won - so if that's the effect it has, Obama wins."