Medieval Arab attitudes to Black people
Attitudes of medieval Arabs to Black people varied over time and individual attitude, but tended to be negative. Though the Qur'an expresses no racial prejudice, ethnocentric prejudice towards black people is widely evident among medieval Arabs, for a variety of reasons: Arabs' extensive conquests and slave trade; the influence of Aristotelian ideas regarding slavery, which some Muslim philosophers directed towards Zanj; and the influence of Judeo-Christian ideas regarding divisions among humankind. On the other hand, the Afro-Arab author Al-Jahiz, himself having a Zanj grandfather, wrote a book entitled Superiority of the Blacks to the Whites, and explained why the Zanj were black in terms of environmental determinism in the "On the Zanj" chapter of The Essays. Terminology
Many medieval Arabic texts categorise people phenotypically into three types of skin-colour: white (al-bīḍān, 'the white ones' associated particularly with Arabs), red (associated particularly with Romans, or Europeans more generally), and black (al-sūdān 'the black ones', associated particularly with darker complexioned Africans). In pre-Islamic Arabia, Black people were referred to as ḥabashī (related to the term Abyssinian); this word's precise meaning is unclear, but it probably denoted people living under Aksumite rule and particularly people from the Horn of Africa. The East African coastal region corresponding to the littoral of what is currently Kenya and Tanzania was called Zanj and people from there (or imagined to be from there) were called by the same term. People encountered by Arab traders along the Senegal and Niger rivers were sometimes referred to by the nicknames Lamlam, Damdam or Namnam. In a number of Arabic dialects, the word ʿabīd ('slaves') has come to denote black Africans. Pre-Islamic period
Pre-Islamic relations outside of North Africa focused on the Aksumite Empire, which exerted considerable power and sometimes direct rule in the Arabian Peninsula from as early as the second century BCE to around Year of the Elephant (sometime in the 550s to 570s), when, at least according to Islamic tradition, increasingly united Arabs defeated Aksumite armies which ruled southern Arabia. During the pre-Islamic period, significant numbers of black people were present in the Arabian Peninsula, and the image of the Abyssinian and African as a warrior is thought to have been significant in the Arab imaginary, both because of the power and presence of Aksumite forces and Arabs' own employment of African mercenaries. Moreover, ḥadīth attributed to Aksum a supportive role for early Muslims, which later encouraged a body of pro-Ethiopian Muslim literature. One important echo of these ideological relationships is found in the writings of al-Jāḥiẓ (d. 868/869), whose Fakhr al-Sūdān wa-al-Bīḍān ('pride of Blacks over Whites') represents debate about the superiority of these races. One of Muḥammad's closest companions was the emancipated slave Bilāl ibn Rabāḥ, who is reputed to have been Black. The work of seven poets who can be identified as Black composed in Arabic in the pre-Islamic period is thought to have survived; these poets include ʿAntarah ibn Shaddād al-Absī (d. 608), Khafāf ibn Nudba al-Sulakhī, and Sulayk bin al-Sulaka, all born to ethnic Arab fathers and enslaved Black mothers (respective Hassad, Mufuta, and Mutunda) and known as 'the crows of the Arabs'. This poetry attests to the abuse these poets received for their Black skin and/or parentage, as does Arabic poetry which expresses abuse of this kind from the early Islamic period. Islamic Middle Ages
As Aksumite power declined and military challenges to Arabs' power came increasingly from the Roman Empire and Persia, Arab political relationships with sub-Saharan Africa shifted. Relations with Aksum focused not on war but on trading, particularly as part of the Indian Ocean slave trade. Arab influence on the African coast near the Horn of Africa led to a number of African polities becoming Muslim, such as the Sultanate of Dawaro, Fatagar, Hadiya Sultanate and Bale Province, Ethiopia; this region was referred to around 1400 by the geographer Al-Maqrīzī as al-ṭirāz al-islamī ("the Muslim Fringe"). Once Arab armies had conquered Egypt in 639-41, they also neighboured the Nubian, Christian kingdom of Dongola, which would remain independent into the thirteenth century, and also had ready access to Greek geographical scholarship, which would remain profoundly influential in Arab conceptions of Africa throughout the Middle Ages. By the ninth century, with North Africa now part of the Caliphate, contact with West Africa was also underway via coastal routes. These encounters likewise provided hubs for human trafficking. According to Helmi Sharawi, "these economic activities were the foundation of Arab production modes for ten centuries and gave rise to the image of 'Master Arab merchant' who dominated the Abyssinian or Negro slave". (Though within this overall prejudiced climate, the status of Black Muslims (who were among the Muslims known as mawālī) was superior to that of non-Muslim Africans associated with more westerly parts of the continent.) Thus, in the Islamic period, dark-skinned Africans in the Arabian Peninsula and elsewhere in Caliphate tended to be slaves. For example, al-Ṭabarī estimated that in Southern Basra alone there were around 15,000 around the 870s. This situation encouraged Arabs to view themselves as superior to Black people, not least as a mechanism for Arabs to justify the enslavement of others. For example, Ibn Buṭlān composed a noted, stereotyping description of the qualities of slaves of different races, which is relatively positive about Nubians, but otherwise particularly negative about the characteristics of Black people. These negative characteristics included the idea that black men were sexually voracious; thus the most recurrent stereotype of black people in the Thousand and One Nights is the black male slave fornicating with a white woman, while the Egyptian historian al-Abshibi (d. 1446) wrote that "[i]t is said that when the [black] slave is sated, he fornicates, when he is hungry, he steals." Allegedly, such was his distrust of Black people, Abu Muslim al-Khurasani massacred four thousand of his own Black soldiers after completing the Abbasid Revolution. Abuse of phenotypical features associated with Black African people is found even in the poems composed by al-Mutanabbī (d. 965) in both praise and criticism of the Black vizier of Egypt Abū al-Misk Kāfur (d. 968), which variously seek either to excuse or to lambast Kāfur for his colour and heritage. Mass revolts of slaves during the Abbasid period were particularly associated with Black slaves by contemporary writers; the most prominent is the so-called Zanj Rebellion of 869-883. The precise composition (and degrees of freedom) of the rebels is uncertain, however; in the assessment of Helmi Sharawi, the association of Black people with rebellion in medieval Arabic sources partly reflects prejudice towards Black people, and he argues that the rebellions were not to do with race as such "but were a part of the whole context of resisting inequality and oppression in the four corners of the Arab-Islamic world". The position of Aksum as a threat to pre- and early-Islamic Arabian power also continued to be invoked in anti-Black rhetoric. About fifteen of the many medieval Arabic travel-writers discuss West and East Africa, most famously Ibn Baṭṭūṭa, potentially representing opportunities for more diverse encounters with and nuanced attitudes to Black people than encounters with slaves in the rest of the Arab world would have produced; but their accounts remain highly stereotyped. According to Helmi Sharawi, 'when the traveller deals with the subjective aspect of Black character, he remembers but the sexual dissipation, women’s stripped apparel and their deep involvement in superstition'. Likewise, in ethnographers' categorisations of nations in this period, Black people are consistently represented as the basest (and Arabs as the finest); for example, al-Tawḥīdī (d. 1023) described Black people as 'errant beasts'. More positive discussions of Black people, such as those of al-Jāḥiẓ, al-Bayhaqī (in his Virtues and Vices; d. 1066) and al-Suyūṭī (in his Promenade in Preference among Whites, Blacks and Coloured; d. 1505), or admiring portrayals of the visit of Mansa Musa to Cairo and Mecca, do exist. But they tend to position their virtues as being in spite of their blackness, whether discussing Black people as individuals or as a nation. Al-Mutannabi:

