Sahih Muslim Book 19, Hadith Number 4452.

Chapter : Regarding the word of God, the Exalted: “It is he who restrained their hands from you” to the end of the verse.

It has been narrated on the authority of Anas b. Malik that eighty Persons from the inhabitants of Mecca swooped down upon the Messenger of Allah (may peace be upon him) from the mountain of Tan’im. They were armed and wanted to attack the Holy Prophet (may peace be upon him) and his Companions unawares. He (the Holy Prophet) captured them but spared their lives. So, God, the Exalted and Glorious, revealed the verses: “It is He Who restrained your hands from them and their hands from you in the valley of Mecca after He had given you a victory over them.”