The Messenger of Allah ﷺ said, "Whoever has a relative killed has the choice between two options, either to have the killer executed or to accept ransom for him."
حدثنا عبد الرحمن بن إبراهيم الدمشقي حدثنا الوليد حدثنا الأوزاعي حدثني يحيى بن أبي كثير عن أبي سلمة
قال رسول الله ﷺ من قتل له قتيل فهو بخير النظرين إما أن يقتل وإما أن يفدى
Bukhari narrated it in the Book of Lost Property, chapter titled "How the Lost Property of the People of Makkah Is Identified," hadith 2434, and Muslim in the Book of Hajj, chapter titled "The Prohibition of Makkah, Its Game, Its Vegetation, Its Trees, and Its Lost Property, Except for One Who Seeks to Identify the Owner Continuously," hadith 1355, from the hadith of Walid bin Muslim, with the same chain.