In the year of the conquest of Mecca, the tribe of Khuza killed a man from Banu Layth in retaliation for one of their own who had been slain during the days of ignorance. So the Messenger of Allah ﷺ stood and said, "Allah held back the elephant from Mecca and gave authority over its people to His Messenger and the believers. Indeed, it was not made lawful for anyone before me, nor will it be lawful for anyone after me. It was made lawful for me only for a portion of a single day, and now, at this very hour, it has returned to its sacred state. Its thorny shrubs are not to be cut, its trees are not to be felled, and its lost property is not to be picked up except by one who will announce it publicly. Whoever has a relative killed has the better of two choices, either to receive blood-money or to demand retaliation." The hadith continues.
أنه عام فتح مكة قتلت خزاعة رجلا من بني ليث بقتيل لهم في الجاهلية، فقام رسول الله ﷺ فقال: إن الله حبس عن مكة الفيل وسلط عليهم رسوله والمؤمنين، ألا وإنها لم تحل لأحد قبلي، ولا تحل لأحد بعدي، ألا وإنها أحلت لي ساعة من نهار، ألا وإنها ساعتي هذه حرام، لا يختلى شوكها، ولا يعضد شجرها، ولا يلتقط ساقطتها إلا منشد، ومن قتل له قتيل فهو بخير النظرين: إما يودى وإما يقاد… الحديث
Bukhari related it in the Book of Blood Money (6880) and Muslim in the Book of Hajj (1355), both of them through Shayban, from Yahya, who said, "Abu Salama informed me that he heard Abu Hurairah," and he related it, and the wording is Bukhari's, while Muslim's wording is similar.