The Book of Transactions (Kitab Al-Buyu`)

Muslim :: Book 10 : Hadith 3901

Jabir (Allah be pleased with him) reported: There came a slave and pledg- ed allegiance to Allah's Apostle (may peace be upon him) on migration; he (the Holy Prophet) did not know that he was a slave. Then there came his master and demanded him back, whereupon Allah's Apostle (may peace be upon him) said: Sell him to me. And he bought him for two black slaves, and he did not afterwards take allegiance from anyone until he had asked him whether he was a slave (or a free man)

Source materials are from the University of Southern California MSA site
Hadith eBooks converted from Imaan Star