We were with the Messenger of Allah ﷺ at Hudaybiyyah while we were in the state of ihram, and the polytheists had blocked our way. I had thick hair, and lice began falling onto my face. The Prophet ﷺ passed by me and asked, "Are the lice in your head troubling you?"I replied, "Yes."He said, and this verse was revealed, "Whoever among you is ill or has an ailment of the scalp must compensate by fasting, charity, or sacrifice" [Baqarah 2:196].
حدثني محمد بن هشام أبو عبد الله حدثنا هشيم عن أبي بشر عن مجاهد عن عبد الرحمن بن أبي ليلى
كنا مع رسول الله ﷺ بالحديبية ونحن محرمون وقد حصرنا المشركون قال وكانت لي وفرة فجعلت الهوام تساقط على وجهي فمر بي النبي ﷺ فقال أيؤذيك هوام رأسك قلت نعم قال وأنزلت هذه الآية {فمن كان منكم مريضا أو به أذى من رأسه ففدية من صيام أو صدقة أو نسك}