Anas said “Eighty Meccans came down from the mountain of Al Tan’im against the Prophet ﷺ and his Companions at the (time of the) dawn prayer to kill them. The Apostle of Allaah ﷺ took them captive without fighting and the Apostle of Allaah ﷺ set them free. Thereupon Allaah Most High sent down “He it is Who averted their hands from you and your hands from them in the valley of Makkah,” till the end of the verse.
أَنَّ ثَمَانِينَ رَجُلاً مِنْ أَهْلِ مَكَّةَ هَبَطُوا عَلَى النَّبِيِّ ﷺ وَأَصْحَابِهِ مِنْ جِبَالِ التَّنْعِيمِ عِنْدَ صَلاَةِ الْفَجْرِ لِيَقْتُلُوهُمْ فَأَخَذَهُمْ رَسُولُ اللَّهِ ﷺ سَلَمًا فَأَعْتَقَهُمْ رَسُولُ اللَّهِ ﷺ فَأَنْزَلَ اللَّهُ ﷻ { وَهُوَ الَّذِي كَفَّ أَيْدِيَهُمْ عَنْكُمْ وَأَيْدِيَكُمْ عَنْهُمْ بِبَطْنِ مَكَّةَ } إِلَى آخِرِ الآيَةِ