Rights of slaves
From the ancient times, slaves were denied basic human rights. Their status was not more than something kept in the house or a product out of a factory. They would be made to work day and night and they would be allowed to rest where animals were kept. There would be a yoke of metal around their necks.
In European law, the master of the slaves had the right to whip the slave and in some cases, could kill the slave as well. The slave did not have the right of even using a name of choice. It was a crime to educate the slave.
In this atmosphere, the Holy Prophet (Sallallahu alaihi wa sallam) urged people to treat their slaves humanely and ordered them to grant the slaves their rights, even to the point of instructing people about their food and dress. In the Sermon of the Last Hajj, the Holy Prophet (Sallallahu alaihi wa sallam) said:
Take care of your slaves! Take care of your slaves. Give them what you yourselves eat and clothe them in what you wear.
Along with giving them the right of education and the right of life, the Holy Prophet (Sallallahu alaihi wa sallam) also gave them the right that if the slave had political ability and acumen, the slave could even become the ruler and obedience to the slave would be Wajib (Compulsory) on all people. In this connection, the Holy Prophet (Sallallahu alaihi wa sallam) said:
O People! Listen and obey to the command of your leader, even though an Abyssinian slave is your leader, who has a snub nose as long as he enforces the Book of Allah Most High in your affairs.