Abdullah bin Abbas reported,

Shaybani said, Ata Abu al-Hasan al-Suwai narrated to me, and I believe he traced it back to Ibn Abbas رضي الله عنهم, regarding the verse "You who believe, it is not lawful for you to inherit women against their will" [Nisa 4:19]. He said, "When a man died, his relatives had the greatest claim to his widow. If one of them wished, he would marry her himself. If they wished, they would marry her off to someone else, and if they wished, they would prevent her from marrying altogether. They had more right to her than her own family. So this verse was revealed concerning that practice."

Bukhari 6948

Sahih

حدثنا حسين بن منصور حدثنا أسباط بن محمد حدثنا الشيباني سليمان بن فيروز عن عكرمة

عن ابن عباس قال

الشيباني وحدثني عطاء أبو الحسن السوائي ولا أظنه إلا ذكره عن ابن عباس رضي الله عنهما {يا أيها الذين آمنوا لا يحل لكم أن ترثوا النساء كرها} الآية قال كانوا إذا مات الرجل كان أولياؤه أحق بامرأته إن شاء بعضهم تزوجها وإن شاءوا زوجها وإن شاءوا لم يزوجها فهم أحق بها من أهلها فنزلت هذه الآية في ذلك

البخاري 6948صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Coercion
Chapter
Compulsion
Numbering
Darussalam 6948
Bukhari 6948