It is one of the enduring paradoxes of American racism that those black Americans most likely to exercise their full rights as citizens - to vote, to stand, to speak out - are the most likely to be branded as unpatriotic.

"Of course the fact that a person believes in racial equality doesn't prove that he's a communist," said the chairman of a loyalty review board, one of the McCarthyite kangaroo courts that sat in judgment of possible communists, in the 50s. "But it certainly makes you look twice, doesn't it? You can't get away from the fact that racial equality is part of the communist line."

Assuming that African-Americans could not possibly work out that white supremacy was not in their interests by themselves, their detractors routinely accused them of acting under influences both foreign and malign. The FBI wasted millions of dollars and hours trying in vain to prove that Martin Luther King was a communist. For those who would not know their place and were not assassinated, the punishment was often the revocation of whatever rights of citizenship they had. Already denied the vote, freedom of movement and association, Paul Robeson was refused a passport in 1950 and confined to the US. When his lawyers asked why, they were told that "his frequent criticism of the treatment of blacks in the United States should not be aired in foreign countries". In 1963 the intellectual and activist WEB Dubois was similarly grounded without passport privileges and so moved to the recently liberated Ghana.

The struggle for racial equality in America has always essentially been a battle for full citizenship. In a country founded on the principles of the enlightenment and built on the backs of slaves, it has long exposed the tension between the country's promise and its practice. The founding fathers held both that all men were equal - and that a slave was worth three-fifths of a man. Sooner or later, the nation would implode under the weight of these constitutional contradictions.

It took the best part of 200 years for the law to catch up. In Barack Obama's candidacy we are now learning how far America's political culture has come in this regard and how far it still has to go. Because, for all the misty-eyed liberal talk of him ushering in a post-racial era, the past few weeks have seen Obama fighting not just for the nomination but for his patriotic legitimacy. Constantly questioning his national loyalty and obfuscating his religious affiliation, both the media and his opponents have sought to cast him not only as anti-American but un-American and at times even non-American. His bid to transcend race appears to be crashing on the rocks of racism.

"Race is intertwined with a broader notion that he is not one of us," Andrew Kohut, director of the Pew Research Centre, told the New York Times. Pew conducted an extensive examination of voter attitudes, particularly among Democrats who have an unfavourable view of Obama. "They react negatively to people who are seen as different."

The point here is not whether white people are prepared to vote for him. First, they clearly are. Of the 10 whitest states to have voted so far, Obama has won nine. And there are countless reasons why people don't back him that have nothing to do with race - not least that they prefer another candidate on their merits.

At issue is the insidious and racist manner in which his candidacy is now being framed as that of a nefarious, foreign interloper whose allegiance to his country is inherently inauthentic and instinctively suspect.

Some of these charges have long emerged from familiar and predictable places. As early as last year, Rupert Murdoch's Fox News falsely claimed that he had attended an Islamist madrasa while a young boy in Indonesia. When rightwing radio hosts refer to him they generally emphasise and repeat his middle name - Hussein - even though Obama rarely uses it.

But soon these attacks shifted from the political margins to the mainstream. During the recent ABC debate, Obama was grilled about his refusal to wear an American flag tiepin. One of the moderators asked Obama of his former pastor, Jeremiah Wright: "You do believe he's as patriotic as you are?"

Having given up on the African-American vote, the Clintons have clearly decided that it makes more electoral sense to collude with these attacks than it does to raise the tenor of the discussion and challenge them. During the ABC debate, Hillary applauded the line of questioning. "You know, these are problems, I think these are issues that are legitimate and should be explored."

Being foreign, Muslim or unpatriotic should not be treated as slurs. But in a post 9/11 framework, the Clintons know full well how these allusions will be understood and what the consequences might be. When asked whether Obama was a Muslim, Hillary said that he wasn't: "There is nothing to base that on - as far as I know."

Three days after Obama made his landmark speech on race, Bill Clinton said of a potential match-up between Hillary Clinton and McCain: "I think it would be a great thing if we had an election year where you had two people who loved this country and were devoted to the interest of this country. And people could actually ask themselves who is right on these issues, instead of all this other stuff that always seems to intrude itself on our politics." The implication was that Obama doesn't love his country and all this "racial" stuff is just getting in the way.

All this does have an effect. By February, 80% of Americans had heard rumours that Obama was Muslim. Even after the furore over the Rev Wright, one in 10 Democrats still believed this. A recent Pew poll showed that the only character trait on which Obama loses to Clinton is patriotism. Exit polls in Pennsylvania revealed that 18% of Democrats said that race mattered to them in this contest - and just 63% of them said that they would support Obama in a general election.

Unable to beat Obama on delegates and still unlikely to beat him in the popular vote, Hillary Clinton has just one strategy left - to persuade superdelegates that Obama is unelectable. She has tried branding him as inexperienced and slick-tongued, and neither of those have worked. At this stage she has just one argument left: his race. For several months now, her aides have been whispering to whoever would listen that America would never elect a black candidate. In desperation, some are now raising their voices.

But their accusations are not only cynical - by most accounts they also seem to be wrong. It seems they have underestimated the potential of the American electorate. Polls show that in the states won with less than a five-point margin in 2004 Obama does far better than Clinton against McCain.

The problem is not that Hillary Clinton is still in the race. She has every right to be. It is that she is running the kind of race that she is. Having failed to convince voters of the viability of her own candidacy, she is now committed to proving the unviability of his.

Hillary once said it takes a village to raise a child. Now she seems determined to destroy the village in order to save it.

g.younge@theguardian.com