كتاب الصيام
13  
The Book of Fasting
(16)
Chapter: The reward of the one who does not fast when travelling if he does any tasks that are required
(16)
باب أَجْرِ الْمُفْطِرِ فِي السَّفَرِ إِذَا تَوَلَّى الْعَمَلَ ‏‏
Sahih Muslim 1120

Qaza'a reported:

I came to Abu Sa'id al-Khudri (Allah be pleased with him) and he was surrounded (by people), and when they dispersed I said to him: I am not going to ask you about what these people were asking. I ask you about fasting on a journey. Upon this he said: We travelled with the Messenger of Allah (ﷺ) towards Mecca and we had been observing fast. We halted at a place. There the Messenger of Allah (ﷺ) said: You are nearing your enemy and breaking of fast would give you greater strength, and that was a concession (given to us). But some of us continued to observe the fast and some of us broke it. We then got down at another place and he (the Holy Prophet) said: You are going to encounter the enemy in the morning and breaking of the fast would give you strength, so break the fast. As it was a point of stress, so we broke the fast. But subsequently we saw ourselves observing the fast with the Messenger of Allah (ﷺ) on a journey.
حَدَّثَنِي مُحَمَّدُ بْنُ حَاتِمٍ، حَدَّثَنَا عَبْدُ الرَّحْمَنِ بْنُ مَهْدِيٍّ، عَنْ مُعَاوِيَةَ بْنِ صَالِحٍ، عَنْ رَبِيعَةَ، قَالَ حَدَّثَنِي قَزَعَةُ، قَالَ أَتَيْتُ أَبَا سَعِيدٍ الْخُدْرِيَّ - رضى الله عنه - وَهُوَ مَكْثُورٌ عَلَيْهِ فَلَمَّا تَفَرَّقَ النَّاسُ عَنْهُ قُلْتُ إِنِّي لاَ أَسْأَلُكَ عَمَّا يَسْأَلُكَ هَؤُلاَءِ عَنْهُ ‏.‏ سَأَلْتُهُ عَنِ الصَّوْمِ فِي السَّفَرِ فَقَالَ سَافَرْنَا مَعَ رَسُولِ اللَّهِ صلى الله عليه وسلم إِلَى مَكَّةَ وَنَحْنُ صِيَامٌ قَالَ فَنَزَلْنَا مَنْزِلاً فَقَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم ‏"‏ إِنَّكُمْ قَدْ دَنَوْتُمْ مِنْ عَدُوِّكُمْ وَالْفِطْرُ أَقْوَى لَكُمْ ‏"‏ ‏.‏ فَكَانَتْ رُخْصَةً فَمِنَّا مَنْ صَامَ وَمِنَّا مَنْ أَفْطَرَ ثُمَّ نَزَلْنَا مَنْزِلاً آخَرَ فَقَالَ ‏"‏ إِنَّكُمْ مُصَبِّحُو عَدُوِّكُمْ وَالْفِطْرُ أَقْوَى لَكُمْ فَأَفْطِرُوا ‏"‏ ‏.‏ وَكَانَتْ عَزْمَةً فَأَفْطَرْنَا ثُمَّ قَالَ لَقَدْ رَأَيْتُنَا نَصُومُ مَعَ رَسُولِ اللَّهِ صلى الله عليه وسلم بَعْدَ ذَلِكَ فِي السَّفَرِ ‏.‏
Reference : Sahih Muslim 1120
In-book reference : Book 13, Hadith 130
USC-MSA web (English) reference : Book 6, Hadith 2486
  (deprecated numbering scheme)