كتاب المغازى
64  
Military Expeditions led by the Prophet (pbuh) (Al-Maghaazi)
(27)
Chapter: “Uhud is a mountain that loves us and is loved by us.”
(27)
باب أُحُدٌ يُحِبُّنَا ‏وَنُحِبُّهُ‏
Sahih al-Bukhari 4085

Narrated `Uqba:

One day the Prophet (ﷺ) went out and offered the (funeral) prayer for the people (i.e. martyrs) of Uhud as he used to offer a funeral prayer for any dead person, and then (after returning) he ascended the pulpit and said, "I am your predecessor before you, and I am a witness upon you, and I am looking at my Tank just now, and I have been given the keys of the treasures of the world (or the keys of the world). By Allah, I am not afraid that you will worship others besides Allah after me, but I am afraid that you will compete with each other for (the pleasures of) this world."

حَدَّثَنِي عَمْرُو بْنُ خَالِدٍ، حَدَّثَنَا اللَّيْثُ، عَنْ يَزِيدَ بْنِ أَبِي حَبِيبٍ، عَنْ أَبِي الْخَيْرِ، عَنْ عُقْبَةَ، أَنَّ النَّبِيَّ صلى الله عليه وسلم خَرَجَ يَوْمًا فَصَلَّى عَلَى أَهْلِ أُحُدٍ صَلاَتَهُ عَلَى الْمَيِّتِ، ثُمَّ انْصَرَفَ إِلَى الْمِنْبَرِ فَقَالَ ‏ "‏ إِنِّي فَرَطٌ لَكُمْ، وَأَنَا شَهِيدٌ عَلَيْكُمْ، وَإِنِّي لأَنْظُرُ إِلَى حَوْضِي الآنَ، وَإِنِّي أُعْطِيتُ مَفَاتِيحَ خَزَائِنِ الأَرْضِ ـ أَوْ مَفَاتِيحَ الأَرْضِ ـ وَإِنِّي وَاللَّهِ مَا أَخَافُ عَلَيْكُمْ أَنْ تُشْرِكُوا بَعْدِي، وَلَكِنِّي أَخَافُ عَلَيْكُمْ أَنْ تَنَافَسُوا فِيهَا ‏"‏‏.‏
Reference : Sahih al-Bukhari 4085
In-book reference : Book 64, Hadith 129
USC-MSA web (English) reference : Vol. 5, Book 59, Hadith 411
  (deprecated numbering scheme)