You can almost hear the groans in the caves on the Afghan-Pakistan border. "What's going on?! Why can't they just keep rendering and torturing people?!"

A couple of years ago, the battle between American and al-Qaida propagandists for the Muslim world's hearts and minds was an easy one for Osama Bin Laden's men. The group didn't have to do much apart from point out all those instances of death, destruction and torture that showed how what America said bared little resemblance to what it did.

Barack Obama's victory challenges the perceptions that form the foundation of al-Qaida's worldview, and it has left its supporters a little confused. The group's propaganda plays up the idea that the US is run by a coalition of rich, white, self-serving businessmen and politicians who use the word "freedom" to persuade the poor to fight for them.

In a message posted on the Counterterrorism Blog in January, al-Qaida's Adam Gadahn repeated some of the organisation's favourite themes: "Muslims, of course, are much better acquainted [than the American public] with what is right and who the victim is and realise that right isn't whatever is said, done and commanded by Western presidents, prime ministers, and televangelists.

"Muslims know what true values are… like liberating oneself and others from oppression, like honour, dignity and self-respect, like chastity and moral uprightness, like truth in word and deed, like showing mercy to the innocent, defenceless, and helpless, and fighting for them, and like giving one's life for these values."

The problem for al-Qaida is that the truth of America's claim to social equality and rule of law looks evident in the deed of Barack Obama's election. With a president who is neither white nor from a rich and well-connected background, al-Qaida's rhetoric is floundering. The confusion is clear on websites used by the group's supporters.

On the password-protected al-Hasbah website, one al-Qaida supporter, Abu Ahmed al Salafi wrote: "The election of this black man to the White House will improve the image of the new Rome in front of the world." It's rare to hear al-Qaida backers talking forlornly about an American public relations coup. It's even less common to hear them say the achievement is acknowledged in Islamic tradition.

"Omar (the second Caliph) was right when he said Rome was the fastest to recover from a setback and that's what's happened with this black man," adds Salafi.

The real game-changer here is that Obama challenges the higher moral ground al-Qaida assumes it commands when talking to its supporters.

Salafi later says: "According to my view, the election of McCain would have been been more useful to the Muslims than this black slave. This is a Christian who is fanatically for the Jews." But the words Salafi has chosen in his state of confused frustration don't sit well with other posters. Later, another poster, Elhajgamal, asks; "My noble brothers. Because he is an infidel enemy we hate on behalf of God, is it permissible for us to address him by the colour of his skin?

The answer from al-Nasr al-Islam: "We say he is black because he is not white. There is no place for racism amongst Muslims."

It's often overlooked that al-Qaida promises a fairer society. If its support is flagging, it's because ordinary people have looked at its methods and wondered what sort of state it would run. But the calls for an end to corruption, nepotism and restoration of pride, dignity and self-determination still resound just as they have for more than 100 years through other ideologies.

Al-Qaida's brand has done well in the past seven years because of America's mistakes rather than the group's achievements. By just proving its continued existence, it could assume an image on the streets of Cairo, Casablanca and Karachi as the plucky standard-bearer of Muslim pride. The torture in Abu Ghraib and the detainees in Guantanamo were heaven-sent opportunities to say; "Look! Rule of law? Human rights? All lies. None of that means anything to America."

Since 9/11, American public diplomacy in the Muslim world has been based on the assumption that over a billion people have unfortunately failed to realise that it is a force for good in the world. The multimillion dollar answers have included Hi, a teen lifestyle magazine, and cheerleader television news station, al Hurrawhich aim to promote American interests.

But for all the telling, America was not showing the Muslim world how it lived up to its promises. General public opinion in the Muslim world saw the same malevolent intention behind Abu Ghraib and Guantánamo Bay that they blamed for Western support of Muslim dictators and Israeli excesses. Al-Qaida simply tries to tap into that background sentiment and connect it to individuals' own experiences.

When America starts showing that it can deliver social justice at home, it makes public opinion in the Muslim world wonder whether it can do so abroad. However, the election only produces a window of opportunity for America, and Britain, to make a serious dent in al-Qaida's rhetoric by proving their commitment to the ideas and principles for which they say they fight. The Obama victory will require follow-up if he is to change perceptions. Closing Guantánamo, as the president-elect has pledged, would be a great start.