SHAFAQNA – It is narrated that one day the Prophet of Islam (PBUH) was walking in the market in Medina and saw a black slave was being sold. The slave was saying: Buy me with one condition that I will not be prevented to pray behind the Prophet (PBUH) because I perform my daily prayers with him and have not prayed anywhere else. A man bought him with that condition and the Prophet (PBUH) used to see the slave every day.
One day, the Prophet (PBUH) could not see the slave and asked after him; people said he is ill and could not attend the prayers. The Prophet (PBUH) went to visit him and after 3 days again asked about the slave, people said he passed away. The moment the Prophet (PBUH) heard the news, stood up and personally carried out the ceremonial washing and wrapping of his body in shroud.
The Mohajerin and Ansar were surprised by the kindness of the Prophet (PBUH) towards the black slave and at this time, Ayah 13 of Surah Al-Hojarat was descended by Allah (SWT), saying: The most honourable of you with Allah (SWT) is the one who is the most pious .
 Tafseer Kashaaf, Vol. 4, page 277.