Islam professes equality among people, overwhelmingly embraces and inspires the concept of brotherhood and strongly encourages believers not to distinguish between people based on colour, race, creed, language, background, etc. The teachings of our complete Deen and the perfect example of our Nabi (Sallallahu Alayhi Wasallam) empathetically condemn discrimination at every level of society. His superb model way of living emancipated man from racial prejudices and discrimination.
However, racism remains to be a severe disease in human society which has its roots embedded since time immemorial. When Nabi (Sallalahu alayhi wasallam) was raised as a Prophet of Allah in Makkah Mukkarama, racism, under the name of tribalism, was strongly prevalent. All this came to an end after Nabi (Sallalahu alayhi wasallam) came with the Divine Message and proclaimed that no Arab is superior over a non-Arab, and no white is superior over black and superiority is by righteousness as declared explicitly in Surah al-Hujurat: “Verily the noblest among you in the sight of Allah is the one who is most deeply conscious of Him”. He also declared that even if an Abyssinian black Muslim were to rule over Muslims, he should be obeyed.
Nabi (Sallalahu alayhi wasallam) said: “O people, Remember that your Lord is One. An Arab has no superiority over a non-Arab nor does a non-Arab have any superiority over an Arab; also, a black has no superiority over a white, nor does a white have any superiority over a black, except by virtue of piety (Taqwa). Indeed the best among you is the one with the best character (Taqwa)” (Baihaqi). He further said: “You are in no way better than (an individual with) a red or black complexion, except if you are able to surpass him in piety.” (Miskhat)
Once a man visited Masjidun Nabawi (Sallalahu alayhi wasallam). There he observed a group of people sitting and discussing their faith together. Among them were Salman (from Persia), Suhayb (from the Eastern Roman empire who was regarded as a Greek) and Bilal (from Africa). The man then said: "If the (Madinan) tribes of Aws and Khazraj support Muhammad, they are his people (that is, Arabs like him), but what are these people doing here?" Nabi (Sallalahu alayhi wasallam) became very upset and angry upon hearing this and immediately he set foot to the masjid, and addressed them saying: "O people, know that the Lord and Sustainer is One. Your ancestor is one, your faith is one. The Arabism of anyone of you is not from your mother or father. It is no more than a tongue (language). Whoever speaks Arabic is an Arab."
A few Quran verses as reference.
"AND MANKIND IS NAUGHT BUT A SINGLE NATION." (2:213)
“O mankind! Indeed We have created you from a single male and female and We have made you into nations and tribes so that you know each other, Verily the noblest among you in the sight of Allah is the one who is most deeply conscious of Him. Behold Allah is all knowing, all aware” (49:13).
"AND HOLD FAST ALL TOGETHER, BY THE ROPE WHICH GOD (STRETCHES OUT FOR YOU), AND BE NOT DIVIDED AMONG YOURSELVES; AND REMEMBER WITH GRATITUDE GOD'S FAVOUR ON YOU; FOR YE WERE ENEMIES, AND HE JOINED YOUR HEARTS IN LOVE, SO THAT BY HIS GRACE YE BECAME BRETHREN; AND YE WERE ON THE BRINK OF THE PIT OF FIRE, AND HE SAVED YOU FROM IT. THUS DOTH GOD MAKE HIS SIGNS CLEAR TO YOU: THAT YE MAY BE GUIDED." (3:103)
A few ahadith as reference.
Nabi (Sallalahu alayhi wasallam) said: “You should listen to and obey your ruler even if he was an Ethiopian” (Bukhari).
Nabi (Sallalahu alayhi wasallam) said: “Let people stop boasting about their ancestors. One is only a pious believer or a miserable sinner. All men are sons of Adam, and Adam came from dust” (Abu Dawud, Tirmidhi).
Hazrat Umar (RA) once said of Hazrat Bilal (A): “Bilal is our master, and was freed by Abu Bakr.”
Zayd ibn Haritha (RA) was a black slave. Nabi (Sallalahu alayhi wasallam). emancipated him and, before the banning of adoption by the Qur’an, adopted him. He married him to Zaynab bint Jahsh, one of the noblest women of the Muslim community. After all these honours he conferred on him, he also appointed him as a commander over the Muslim army in the Byzantine Empire. The army included leading figures of the Companions such as Abu Bakr (RA) and Umar (RA).
Zayd ibn Haritha (RA) commanded an army in which the noblest of the Quraysh, like Ja’far ibn Abu Talib (RA), the cousin of Nabi (Sallalahu alayhi wasallam), and Khalid ibn Walid, the great general of the age, were present.
Professor A.J. Toynbee, a historian had this to say (in 1948): "The extinction of race consciousness amongst Muslims is one of the outstanding achievements of Islam, and in the contemporary world there is, as it happens, a crying need for the propagation of this Islamic virtue."