Sahih al-Bukhari, Volume 9, Book 85, Hadith 81 (USC-MSA)

Narrated Ibn `Abbas: Regarding the Qur'anic Verse: 'O you who believe! You are forbidden to inherit women against their will.' (4.19) The custom (in the Pre-lslamic Period) was that if a man died, his relatives used to have the right to inherit his wife, and if one of them wished, he could marry her, or they could marry her to somebody else, or prevent her from marrying if they wished, for they had more right to dispose of her than her own relatives. Therefore this Verse was revealed concerning this matter.

حَدَّثَنَا حُسَيْنُ بْنُ مَنْصُورٍ، حَدَّثَنَا أَسْبَاطُ بْنُ مُحَمَّدٍ، حَدَّثَنَا الشَّيْبَانِيُّ، سُلَيْمَانُ بْنُ فَيْرُوزَ عَنْ عِكْرِمَةَ، عَنِ ابْنِ عَبَّاسٍ،‏.‏ قَالَ الشَّيْبَانِيُّ وَحَدَّثَنِي عَطَاءٌ أَبُو الْحَسَنِ السُّوَائِيُّ،، وَلاَ أَظُنُّهُ إِلاَّ ذَكَرَهُ عَنِ ابْنِ عَبَّاسٍ ـ رضى الله عنهما ـ ‏{‏يَا أَيُّهَا الَّذِينَ آمَنُوا لاَ يَحِلُّ لَكُمْ أَنْ تَرِثُوا النِّسَاءَ كَرْهًا‏}‏ الآيَةَ قَالَ كَانُوا إِذَا مَاتَ الرَّجُلُ كَانَ أَوْلِيَاؤُهُ أَحَقَّ بِامْرَأَتِهِ، إِنْ شَاءَ بَعْضُهُمْ تَزَوَّجَهَا، وَإِنْ شَاءُوا زَوَّجَهَا، وَإِنْ شَاءُوا لَمْ يُزَوِّجْهَا، فَهُمْ أَحَقُّ بِهَا مِنْ أَهْلِهَا، فَنَزَلَتْ هَذِهِ الآيَةُ فِي ذَلِكَ‏.‏

sunnah.com

And Safiyya bint 'Ubaid said: "A governmental male-slave tried to seduce a slave-girl from the Khumus of the war booty till he deflowered her by force against her will; therefore 'Umar flogged him according to the law, and exiled him, but he did not flog the female slave because the male-slave had committed illegal sexual intercourse by force, against her will." Az-Zuhri said regarding a virgin slave-girl raped by a free man: The judge has to fine the adulterer as much money as is equal to the price of the female slave and the adulterer has to be flogged (according to the Islamic Law); but if the slave woman is a matron, then, according to the verdict of the Imam, the adulterer is not fined but he has to receive the legal punishment (according to the Islamic Law).

وَقَالَ اللَّيْثُ حَدَّثَنِي نَافِعٌ، أَنَّ صَفِيَّةَ ابْنَةَ أَبِي عُبَيْدٍ، أَخْبَرَتْهُ أَنَّ عَبْدًا مِنْ رَقِيقِ الإِمَارَةِ وَقَعَ عَلَى وَلِيدَةٍ مِنَ الْخُمُسِ، فَاسْتَكْرَهَهَا حَتَّى افْتَضَّهَا، فَجَلَدَهُ عُمَرُ الْحَدَّ وَنَفَاهُ، وَلَمْ يَجْلِدِ الْوَلِيدَةَ مِنْ أَجْلِ أَنَّهُ اسْتَكْرَهَهَا‏.‏ قَالَ الزُّهْرِيُّ فِي الأَمَةِ الْبِكْرِ، يَفْتَرِعُهَا الْحُرُّ، يُقِيمُ ذَلِكَ الْحَكَمُ مِنَ الأَمَةِ الْعَذْرَاءِ بِقَدْرِ قِيمَتِهَا، وَيُجْلَدُ، وَلَيْسَ فِي الأَمَةِ الثَّيِّبِ فِي قَضَاءِ الأَئِمَّةِ غُرْمٌ، وَلَكِنْ عَلَيْهِ الْحَدُّ‏.‏

sunnah.com