The Prophet Muhammad upheld justice in his time and rejected the ignorant belief, which considered some people superior to others because of their language, race, social status or ethnicity. That is because such discrimination is severely condemned in the Qur'an. "Racism," as defined in our day, is an idea Allah prohibits in the Qur'an, but which receives extensive support in ignorant societies. One of the divine purposes in the creation of the different races is "that they should come to know each other." In the Sight of Allah, all people are equal, and the only superiority anyone can have over anyone else is his fear of Allah and faith in Him.
The Prophet Muhammad also declared to his people, who committed racism, that ethnic differences had no importance and that everyone was equal in the eyes of Allah. He repeatedly underlined that all that mattered was having sincere faith.
The Prophet Muhammad also told people that Allah created man from nothing, that everyone is created equal and that everyone will give account of his deeds all alone before Allah. For this reason, he added that it would be a great wrong to look for superiority in one's descent.
The Prophet commanded thus:
(All of) you are children of Adam, and Adam is from dust. Let some men cease to take pride in others.(i)
The Prophet stated that no criteria except for heedfulness are acceptable:
Your descent is nothing to be proud of. Nor does it bring you superiority. O people! All of you are the children of Adam. You are like equal wheat grains in a bowl ... No one has any superiority over anyone else, except in religion and heedfulness. In order to consider someone a wicked person, it suffices that he humiliates other people, is mean with money, bad-tempered and exceeds the limits.(ii)
Throughout his life, the Prophet Muhammad advised his people to set aside their ignorant and perverse values and to live by the Qur'an. In the Qur'an, racist attitudes are defined as "fanatical rage," and people's ambitious attitudes are criticised. A related verse reads:
Those who disbelieve filled their hearts with fanatical rage-the fanatical rage of the Time of Ignorance-and Allah sent down serenity to His Messenger and to the believers, and obliged them to respect the formula of heedfulness which they had most right to and were most entitled to. Allah has knowledge of all things. (Surat al-Fath, 26)
Muslims who obeyed Allah's call in the above verse led their lives in peace and security, both during the Blessed Period of the first community of Islam and in succeeding ages when just administrators reigned.
(i) Narrated by Abu Hurayrah (r.a.), Ahmad, Abu Dawud, 4/331
(ii) Mosnad Ahmad, 4/158, Ibn Qasir, 4/218