Eighty men from the people of Mecca descended upon the Prophet ﷺ and his companions from the mountains of Tanim at the time of the dawn prayer, intending to kill them. The Messenger of Allah ﷺ captured them peacefully, then set them free. So Allah revealed, "And it is He who restrained their hands from you and your hands from them within Mecca" [Fath 48:24], to the end of the verse.
حدثنا موسى بن إسمعيل قال حدثنا حماد قال أخبرنا ثابت
أن ثمانين رجلا من أهل مكة هبطوا على النبي ﷺ وأصحابه من جبال التنعيم عند صلاة الفجر ليقتلوهم فأخذهم رسول الله ﷺ سلما فأعتقهم رسول الله ﷺ فأنزل الله عز وجل {وهو الذي كف أيديهم عنكم وأيديكم عنهم ببطن مكة} إلى آخر الآية