Fiqh-us-Sunnah Volume 3, Zakaat and Fasting, Fiqh 3.093B.

Section : Slaves (wa fi ar-riqab), recipients of sadaqah.

The liberation of slaves includes buying and setting them free, helping contracted slaves (al-mukatabun) pay off their debts, and helping captives buy their way out of captivity. By encouraging people to spend out of their wealth on slaves, the shari ‘ah wants to emancipate the latter. Still, as important as the emancipation of slaves is, in terms of priorities, it is placed at the end, after the orphans, the needy, the wayfarer, and the beggar, the reason being that the former fall under the need for preserving life (which has a higher value), while the latter falls under the right to freedom (a lesser value than life).