حَدَّثَنَا خَالِدُ بْنُ مَخْلَدٍ، حَدَّثَنَا سُلَيْمَانُ بْنُ بِلاَلٍ، قَالَ حَدَّثَنِي صَالِحُ بْنُ كَيْسَانَ، عَنْ عُبَيْدِ اللَّهِ بْنِ عَبْدِ اللَّهِ، عَنْ زَيْدِ بْنِ خَالِدٍ ـ رضى الله عنه ـ قَالَ خَرَجْنَا مَعَ رَسُولِ اللَّهِ صلى الله عليه وسلم عَامَ الْحُدَيْبِيَةِ، فَأَصَابَنَا مَطَرٌ ذَاتَ لَيْلَةٍ، فَصَلَّى لَنَا رَسُولُ اللَّهِ صلى الله عليه وسلم الصُّبْحَ، ثُمَّ أَقْبَلَ عَلَيْنَا فَقَالَ ‏"‏ أَتَدْرُونَ مَاذَا قَالَ رَبُّكُمْ ‏"‏‏.‏ قُلْنَا اللَّهُ وَرَسُولُهُ أَعْلَمُ‏.‏ فَقَالَ ‏"‏ قَالَ اللَّهُ أَصْبَحَ مِنْ عِبَادِي مُؤْمِنٌ بِي وَكَافِرٌ بِي، فَأَمَّا مَنْ قَالَ مُطِرْنَا بِرَحْمَةِ اللَّهِ وَبِرِزْقِ اللَّهِ وَبِفَضْلِ اللَّهِ‏.‏ فَهْوَ مُؤْمِنٌ بِي، كَافِرٌ بِالْكَوْكَبِ‏.‏ وَأَمَّا مَنْ قَالَ مُطِرْنَا بِنَجْمِ كَذَا‏.‏ فَهْوَ مُؤْمِنٌ بِالْكَوْكَبِ، كَافِرٌ بِي ‏"‏‏.‏
Translation
Narrated Ka`b bin Ujra

We were in the company of Allah's Messenger (ﷺ) at Al-Hudaibiya in the state of Ihram and the pagans did not allow us to proceed (to the Ka`ba). I had thick hair and lice started falling on my face. The Prophet (ﷺ) passed by me and said, "Are the lice of your head troubling you?" I replied, Yes." (The sub-narrator added, "Then the following Divine Verse was revealed:-- "And if anyone of you is ill or has an ailment in his scalp, (necessitating shaving) must pay a ransom (Fida) of either fasting or feeding the poor, Or offering a sacrifice." (2.196)