Language:
كتاب الحدود
86  
Limits and Punishments set by Allah (Hudood)
(42)
Chapter: What punishment may be inflicted on the person so that they may not commit the same sin again, or so that they may learn good manners
(42)
باب كَمِ التَّعْزِيرُ وَالأَدَبُ
Sahih al-Bukhari 6851

Narrated Abu Huraira:

Allah's Messenger (ﷺ) forbade Al-Wisal (fasting continuously for more than one day without taking any meals). A man from the Muslims said, "But you do Al-Wisal, O Allah's Messenger (ﷺ)!" Allah's Messenger (ﷺ) I said, "Who among you is similar to me? I sleep and my Lord makes me eat and drink." When the people refused to give up Al-Wisal, the Prophet (ﷺ) fasted along with them for one day, and did not break his fast but continued his fast for another day, and when they saw the crescent, the Prophet (ﷺ) said, "If the crescent had not appeared, I would have made you continue your fast (for a third day)," as if he wanted to punish them for they had refused to give up Al-Wisal.

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