Sahih al-Bukhari, Hadith 1245

Narrated Abu Huraira: Allah's Messenger informed (the people) about the death of An-Najashi on the very day he died. He went towards the Musalla (praying place) and the people stood behind him in rows. He said four Takbirs (i.e. offered the Funeral prayer).

حَدَّثَنَا إِسْمَاعِيلُ، قَالَ حَدَّثَنِي مَالِكٌ، عَنِ ابْنِ شِهَابٍ، عَنْ سَعِيدِ بْنِ الْمُسَيَّبِ، عَنْ أَبِي هُرَيْرَةَ ـ رضى الله عنه ـ أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم نَعَى النَّجَاشِيَّ فِي الْيَوْمِ الَّذِي مَاتَ فِيهِ، خَرَجَ إِلَى الْمُصَلَّى، فَصَفَّ بِهِمْ وَكَبَّرَ أَرْبَعًا‏.‏

sunnah.com