Maliks Muwatta Book 038, Hadith Number 009.

Section : Slaves Permitted to be Freed when a Slave must be Freed by Obligation.

Malik related to me from Ibn Shihab from Ubaydullah ibn Abdullah ibn Utba ibn Masud that one of the Ansar came to the Messenger of Allah, may Allah bless him and grant him peace, with a black slave-girl of his. He said, "Messenger of Allah, I must set a slave free who is a mumina. If you think that she is mumina, I will free her." The Messenger of Allah, may Allah bless him and grant him peace, questioned her, "Do you testify that there is no god but Allah?" She said, "Yes." "Do you testify that Muhammad is the Messenger of Allah?" She said, "Yes." "Are you certain about the rising after death?" She said, "Yes." The Messenger of Allah, may Allah bless him and grant him peace, said, "Free her."