It is narrated from Sayyiduna Ibn Mas'ud (may Allah be pleased with him) that "he used to dislike the sale of the mukatab (a slave who has made a contract for his freedom)." Imam al-Hakim and Imam al-Bayhaqi also transmitted this report in their books. Imam al-Shafi'i (may Allah have mercy on him) said: "When the owners of the slave and the mukatabah (slave-woman) herself agree to the sale, this in fact amounts to ending the contract of kitabah." Imam al-Shafi'i (may Allah have mercy on him) further said: "Some people asked me: then what is the meaning of the Prophet (peace and blessings be upon him) annulling, for Sayyidah Aishah (may Allah be pleased with her), the condition laid down by the owners of Barirah? I replied: Allah knows best; it is quite clear in that very hadith that the Messenger of Allah (peace and blessings be upon him) had already informed them that Allah Almighty has decreed that wala' (the right of inheritance through freeing) belongs to the one who frees. And Allah, the Mighty and Majestic, says: 'Call them by the names of their fathers; that is more just in the sight of Allah. But if you do not know their fathers, then they are your brothers in religion and your friends (mawali).' And Allah, Glorified and Exalted, has related these slaves to their mawali (those who freed them) just as He related them to their real fathers. So just as it is not permissible to separate them from their fathers, likewise it is not permissible to separate them from those mawali of theirs who became responsible for their trust and guardianship. Allah Almighty also said: 'And when you said to the one on whom Allah had bestowed favour and on whom you had bestowed favour: Keep your wife to yourself.' And the Messenger of Allah (peace and blessings be upon him) declared decisively: 'Al-wala'u liman a'taq' (wala' belongs to the one who frees). He (peace and blessings be upon him) also strictly forbade the buying and selling of wala' and giving it as a gift, and it is also narrated from him (peace and blessings be upon him) that he (peace and blessings be upon him) said: 'Al-wala'u luhmatun ka-luhmat al-nasab, la yuba'u wa la yuhab' (wala' is a bond as firm as the bond of lineage; it may not be sold nor given as a gift). So when this legal ruling reached them, whoever laid down a condition against the decision of Allah and His Messenger (peace and blessings be upon him) became disobedient to Allah; and since prescribed punishments and disciplinary rulings are set for disobedience, one excellent way of disciplining the disobedient was to declare their unlawful conditions void, so that they would refrain from such conduct or others would take a lesson from it, and this was the highest method of training and discipline." Imam al-Za'farani also narrated this meaning from Imam al-Shafi'i (may Allah have mercy on him) with further clarity.