Abdullah bin Ma’qil reports: I was sitting with Sayyiduna Ka’b bin ‘Ujrah (may Allah be pleased with him) in the mosque. I asked him about this verse: “Then its compensation is fasting, or charity, or sacrifice.” Sayyiduna Ka’b (may Allah be pleased with him) said: This verse was revealed about me. I had pain in my head (that is, there were too many lice). I was brought to the service of the Prophet (peace and blessings be upon him) and lice were coming onto my face. The Prophet (peace and blessings be upon him) said: I did not realize that your distress had increased to the extent that I am now seeing. Do you have a goat? I said: No. The narrator says, so regarding this, the verse was revealed: “Then its compensation is fasting, or charity, or sacrifice.” (The narrator states:) The fasting will be for three days, and in charity, half a sa’ of grain will be given to each needy person, and the sacrifice will be of a goat.
Hadith Referenceصحیح ابن حبان / كتاب الحج / 3985
Hadith Gradingفضيلة الشيخ الإمام محمد ناصر الدين الألبانيصحيح - «الإرواء» (4/ 231): ق.فضيلة الشيخ العلّامة شُعيب الأرناؤوطإسناده صحيح على شرط الشيخين