On 13 July 2010, Barack Obama gave an interview to the South African Broadcasting Corporation in which he attacked al-Qaeda and its supporters' disregard for African life. The White House went on to describe al-Qaeda as "racist" and for treating black Africans like "cannon fodder". Right-wing commentators have since been on the warpath, accusing Obama of getting angry only when the victims of terrorism are black. In response, the president's supporters have been at pains to explain that his statement was part of a discussion on Islam in Africa and that his critics are mischievously interpreting it out of its original context.

Whatever Obama's original intention was, he touched on a sensitive topic within Muslim communities, one that Muslim scholars, particularly in Africa, have been discussing since the 7 August 1998 al-Qaeda bombings in Kenya and Tanzania. Al-Qaeda and its supporters have succeeded in justifying their violence not only by manipulating theology, but also by basing their arguments on what many in Africa believe are racist readings of certain narrations (known in Arabic as ahadith) attributed to the Prophet of Islam. Since Obama's election, such "Prophetic narrations" have been widely circulated, discussed and commented upon on Arabic websites and forums supportive of al-Qaeda.

These narrations have become part of al-Qaeda's eschatology, an end-times theology in which Obama's presidency is seen and presented as a fulfilment of a prophecy about the rise of "an evil black African political power". According to one of the narrations, a "skinny-legged", "big-eared", black African from Abyssinia leading a powerful army will destroy the Kaaba (the Muslim holy sanctuary in Mecca) while prospecting for gold! The original Arabic of the narrations mentions "skinny legs" and "big ears".

During the 2008 US presidential elections, Arnold Schwarzenegger criticised Obama for his skinny legs while Rush Limbaugh and others made references to Obama's "big ears". Little did they know that they were providing material for scholia on al-Qaeda's interpretations of Islamic eschatology. We have since seen discussions on Arabic forums asking, "Is Obama the skinny-legged man mentioned in hadith?" and "Will Obama destroy the Kaaba?"

In the early 1980s in apartheid South Africa, an Islamic organisation published a book titled Kitaabul Imaan (meaning "book of faith"), which listed the rise and reign of "evil black Africans" as one of the "Greater Signs" of the end of times. Islamic youth organisations in neighbouring independent states such as Zimbabwe mounted successful campaigns to have the book banned, on the grounds that it was racist, un-Islamic and dehumanising to black Africans. However, the book is still in wide circulation and it forms part of a body of Muslim literature that some Islamic scholars have classified as racist material.

Middle Eastern societies have a long way to go in acknowledging and dealing with the injustices of racism in their midst, as a recent meticulously researched book by Brian Whitaker, What's Really Wrong With the Middle East, is able to show. It is not uncommon in the Arab countries to see an Arabic film production of a religious drama in which the roles of the Prophet's black companions are played by Arab actors with blackened faces. What is different about extremist and terrorist organisations such as al-Qaeda and their supporters is their deployment of religious texts to legitimise racist positions.

Since the early proliferation of such texts, some classical Islamic scholars have been quick to condemn them and question their sources. The first to do so was the black 9th-century polymath al-Jahiz in Abbasid Iraq, who wrote the controversial work The Book of the Glory of the Blacks Over Whites and the celebrated Rasa'il (Essays). His arguments in defence of black Africans against what he saw as Arab racial prejudice became the basis for later writers, including none other than the medieval theologian Jalal al-Din Suyuti, still regarded today as one of the most authoritative Islamic scholars.

Suyuti went on to write the book Elevating the Status of the Blacks. Ironically, it was the theologian Ibn Jawzi (died 1200), a figure highly regarded by al-Qaeda, who produced the most devastating attack on the prolific narrations against black Africans in his Apologia on Behalf of the Black People and Their Status in Islam. The only English translation of this book is available as part of a PhD thesis in the library at the School of Oriental and African Studies in London.

Race and racism are taboo topics that many of us Muslims prefer not to discuss unless they relate to non-Muslims' attitudes to Muslims. I think that a successful response to the manipulation of Islamic theological texts by al-Qaeda and its affiliate groups, in an effort to justify their violence, must consider seriously the issues of race and racism and how these sometimes have a bearing on interpretation of such texts, particularly those which now form part of Islamic eschatology.

Michael Mumisa is a PhD candidate and Special Livingstone Scholar at Trinity Hall, University of Cambridge, and also works as a researcher at Woolf Institute in Cambridge.