Sahih Bukhari – Hadith No : 1326

Narrated ‘Amir: Ibn `Abbas (who was at that time a boy) said, “Allah’s Apostle came to a grave and the people said, ‘He or she was buried yesterday.’ ” Ibn `Abbas added, “We aligned behind the Prophet and he led the funeral prayer of the deceased.”

Hadith In Arabic Text :

حدثنا يعقوب بن إبراهيم، حدثنا يحيى بن أبي بكير، حدثنا زائدة، حدثنا أبو إسحاق الشيباني، عن عامر، عن ابن عباس رضى الله عنهما قال أتى رسول الله صلى الله عليه وسلم قبرا، فقالوا هذا دفن، أو دفنت البارحة‏.‏ قال ابن عباس رضى الله عنهما فصفنا خلفه ثم صلى عليها‏.‏

Chapter : Funerals (Al-Janaa’iz) – كتاب الجنائز