كتاب عيادة المريض وتشييع الميت والصلاة عليه وحضور دفنه
6  
The Book of Visiting the Sick
(156)
Chapter: Excellence of Participation in Funeral Prayers in Large Numbers and Formation of Three Rows or More
(156)
- باب استحباب تكثير المصلين على الجنازة وجعل صفوفهم ثلاثة فأكثر
Riyad as-Salihin 934
Marthad bin 'Abdullah Al-Yazni reported:
When Malik bin Hubairah (May Allah be pleased with him) offered a funeral prayer and found a small number of participants, he would divide them into three rows and would say that the Messenger of Allah (ﷺ) said, "If three rows of men offer funeral prayer over anyone, his entry into Jannah will become certain."

[Abu Dawud and At- Tirmidhi].

وعن مرثد بن عبد الله اليزني قال‏:‏ كان مالك بن هبيرة رضي الله عنه إذا صلى علي الجنازة ، فتقال الناس عليها، جزأهم عليها ثلاثة أجزاء، ثم قال‏:‏ قال رسول الله صلى الله عليه وسلم ‏:‏ “من صلى عليه ثلاثة صفوف، فقد أوجب “ ‏(‏‏(‏رواه أبو دواد، والترمذي وقال‏:‏ حديث حسن‏)‏‏)‏‏.‏
Reference : Riyad as-Salihin 934
In-book reference : Book 6, Hadith 41