[Machine] The Messenger of Allah ﷺ stood beside me in Hudaybiyah while I had lice on my head. He asked, "Do your lice bother you?" I replied, "Yes, O Messenger of Allah." He said, "Shave your head." He also mentioned the verse starting with "So whoever among you is ill or has an ailment in his scalp" until the end of the verse. Then the Messenger of Allah ﷺ said, "Fast for three days, or give charity or offer sacrifice as compensation."
قَالَ وَقَفَ عَلَيَّ رَسُولُ اللهِ ﷺ بِالْحُدَيْبِيَةِ وَرَأْسِي يَتَهَافَتُ قَمْلًا فَقَالَ أَتُؤْذِيكَ هَوَامُّكَ؟ قُلْتُ نَعَمْ يَا رَسُولَ اللهِ قَالَ فَاحْلِقْ رَأْسَكَ أَوْ قَالَ فَاحْلِقْ قَالَ فَفِيَّ نَزَلَتْ هَذِهِ الْآيَةُ {فَمَنْ كَانَ مِنْكُمْ مَرِيضًا أَوْ بِهِ أَذًى مِّنْ رَأْسِهِ فَفِدْيَةٌ مِنْ صِيَامٍ أَوْ صَدَقَةٍ أَوْ نُسُكٍ} [البقرة 196] إِلَى آخِرِهَا فَقَالَ رَسُولُ اللهِ ﷺ صُمْ ثَلَاثَةَ أَيَّامٍ أَوْ تَصَدَّقْ بِفَرَقٍ بَيْنَ سِتَّةٍ أَوِ انْسُكْ بِمَا تَيَسَّرَ