كتاب الْمَسَاجِدِ وَمَوَاضِعِ الصَّلاَةِ
5  
The Book of Mosques and Places of Prayer
Sahih Muslim 523 e

Abu Huraira reported:

The Messenger of Allah (ﷺ) said: I have been helped by terror (in the heart of the enemy) ; I have been given words which are concise but comprehensive in meaning; and while I was asleep I was brought the keys of the treasures of the earth which were placed in my hand.
وَحَدَّثَنِي أَبُو الطَّاهِرِ، أَخْبَرَنَا ابْنُ وَهْبٍ، عَنْ عَمْرِو بْنِ الْحَارِثِ، عَنْ أَبِي يُونُسَ، مَوْلَى أَبِي هُرَيْرَةَ أَنَّهُ حَدَّثَهُ عَنْ أَبِي هُرَيْرَةَ، عَنْ رَسُولِ اللَّهِ صلى الله عليه وسلم أَنَّهُ قَالَ ‏ "‏ نُصِرْتُ بِالرُّعْبِ عَلَى الْعَدُوِّ وَأُوتِيتُ جَوَامِعَ الْكَلِمِ وَبَيْنَمَا أَنَا نَائِمٌ أُتِيتُ بِمَفَاتِيحِ خَزَائِنِ الأَرْضِ فَوُضِعَتْ فِي يَدَىَّ ‏"‏ ‏.‏
Reference : Sahih Muslim 523e
In-book reference : Book 5, Hadith 11
USC-MSA web (English) reference : Book 4, Hadith 1066
  (deprecated numbering scheme)