Language:
كتاب الشهادات
52  
Witnesses
(30)
Chapter: Drawing lots to solve problems
(30)
بَابُ الْقُرْعَةِ فِي الْمُشْكِلاَتِ
Sahih al-Bukhari 2689

Narrated Abu Huraira:

Allah's Messenger (ﷺ) said, "If the people knew what is the reward of making the call (for the prayer) and (of being in) the first row (in the prayer), and if they found no other way to get this privilege except by casting lots, they would certainly cast lots for it. If they knew the reward of the noon prayer, they would race for it, and if they knew the reward of the morning (i.e. Fajr) and `Isha prayers, they would present themselves for the prayer even if they had to crawl to reach there.

حَدَّثَنَا إِسْمَاعِيلُ، قَالَ حَدَّثَنِي مَالِكٌ، عَنْ سُمَىٍّ، مَوْلَى أَبِي بَكْرٍ عَنْ أَبِي صَالِحٍ، عَنْ أَبِي هُرَيْرَةَ ـ رضى الله عنه ـ أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم قَالَ ‏ "‏ لَوْ يَعْلَمُ النَّاسُ مَا فِي النِّدَاءِ وَالصَّفِّ الأَوَّلِ، ثُمَّ لَمْ يَجِدُوا إِلاَّ أَنْ يَسْتَهِمُوا عَلَيْهِ لاَسْتَهَمُوا، وَلَوْ يَعْلَمُونَ مَا فِي التَّهْجِيرِ لاَسْتَبَقُوا إِلَيْهِ، وَلَوْ يَعْلَمُونَ مَا فِي الْعَتَمَةِ وَالصُّبْحِ لأَتَوْهُمَا وَلَوْ حَبْوًا ‏"‏‏.‏
Reference : Sahih al-Bukhari 2689
In-book reference : Book 52, Hadith 50
USC-MSA web (English) reference : Vol. 3, Book 48, Hadith 854
  (deprecated numbering scheme)