Language:
كتاب الجنائز
23  
Funerals (Al-Janaa'iz)
(72)
Chapter: The funeral Salat (prayer) of a martyr
(72)
باب الصَّلاَةِ عَلَى الشَّهِيدِ
Sahih al-Bukhari 1344

Narrated `Uqba bin 'Amir:

One day the Prophet (ﷺ) went out and offered the funeral prayers of the martyrs of Uhud and then went up the pulpit and said, "I will pave the way for you as your predecessor and will be a witness on you. By Allah! I see my Fount (Kauthar) just now and I have been given the keys of all the treasures of the earth (or the keys of the earth). By Allah! I am not afraid that you will worship others along with Allah after my death, but I am afraid that you will fight with one another for the worldly things."

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