The people used to follow this practice. When a man died, his close male relatives had the greatest claim over his widow. If one of them wished to marry her himself, he could. If they wished, they could marry her off to someone else, and if they wished, they could prevent her from marrying altogether. They had more right to her than her own family. Then this verse was revealed concerning that.
في قوله تعالى: {يأيها الذين ءامنوا لا يحل لكم أن ترثوا النساء كرها ولا تعضلوهن} [النساء: ١٩]
كانوا إذا مات الرجل كان أولياؤه أحق بامرأته. إن شاء بعضهم تزوجها، وإن شاؤوا زوجوها، وإن شاؤوا لم يزوجوها، فهم أحق بها من أهلها. فنزلت هذه الآية بذلك.
Bukhari related it in the Chapter of Compulsion (6948), from Husayn bin Mansur, who said, Asbat bin Muhammad narrated to us, Shaybani, Sulayman bin Fayruz, narrated to us, from Ikrima, from Ibn Abbas, and he related it. Shaybani said, "Atta Abu Hasan Sawai narrated to me, and I do not think he mentioned it except from Ibn Abbas," and he related it.Abu Dawud (2089) also related it from the hadith of Asbat in similar fashion, and he also related it from Ahmad bin Muhammad bin Thabit Marwazi, who said, Ali bin Husayn bin Waqid narrated to me, from his father, from Yazid Nahwi, from Ikrima, from Ibn Abbas, who said, "It is not lawful for you to inherit women against their will, nor to hinder them from remarrying in order to take away part of what you had given them, unless they commit a clear immorality" [Nisa 4:19]. This was because a man used to inherit a female relative of his and then hinder her from remarrying until she died, or until she gave up her dower to him. So Allah issued a ruling forbidding that, prohibiting it.Its chain of transmission is hasan on account of Ali bin Husayn bin Waqid and his father Husayn bin Waqid, for both of them are "truthful" narrators. Yazid Nahwi is Ibn Abu Saeed Marwazi.His statement, "So Allah issued a ruling forbidding that," means He prevented it. Jareer bin Khatafa said,"O sons of Hanifa, restrain your foolish ones, for I fear you may provoke my anger."