I prayed and then found impurity on my garment; do I repeat the prayer?
Short answer
If he prayed while ignorant of the impurity or forgetful of it and then learned after the prayer, his prayer is valid according to what the Shaykh determined, and he need not repeat.
Evidence and explanation
The Shaykh cited the story of the Prophet ﷺ praying in his sandals then taking them off after Jibril informed him of filth, and he did not restart the prayer.
Scholar referenced
This editorial summary is based on the original source linked below and is not presented as a verbatim quotation from the scholar.
From the text of the answer (Arabic, with an English translation)
Original answer — Shaykh ‘Abd al-‘Aziz ibn Baz
حكم صلاة من وجد في ثوبه نجاسة — فتوى ١٢٢٣٣- Question
«يسأل الأخوان هذا السؤال: إذا اكتشف الإنسان أن في ملابسه شيئًا من النجاسة وقد صلى به بعض الفروض، فهل تبطل تلك الصلوات؟»
English translation (unreviewed): The brothers ask this question: If a person discovers that his clothes had some impurity on them and he has prayed some of the obligatory prayers in them, are those prayers invalid?
- From the text of the answer
«إذا صلى وهو جاهل بالنجاسة أو ناسيًا لها فليس عليه شيء، إذا فرغ من الصلاة وقد وجد في ثوبه نجاسة فإن صلاته صحيحة سواء كان ناسيًا لها قد علمها قبل ثم نسي أو كان جاهلًا لها بالكلية فإن الصواب أن صلاته صحيحة وليس عليه إعادة؛ لأنه ثبت عن النبي ﷺ "أنه ذات يوم صلى في نعليه فنبهه جبرائيل أن فيهما قذراً فخلعهما" ولم يستأنف بل أكمل صلاته عليه الصلاة والسلام، فدل ذلك على أن من صلى في شيء فيه نجاسة ولم يعلم فإن صلاته صحيحة، ولكن متى علم يخلع إذا علم وهو في الصلاة كالنعل خلعها، وكالغترة والعمامة يخلعها أو البشت يخلعه وهو في الصلاة ولا يضره، أما إن كان لا يمكنه خلعه»
English translation (unreviewed): If he prayed while ignorant of the impurity or forgetful of it, there is nothing on him. If he finishes the prayer and finds impurity on his garment, his prayer is valid, whether he had known of it before and forgot, or was entirely unaware of it; the correct view is that his prayer is valid and he need not repeat it, because it is established that the Prophet ﷺ one day prayed in his sandals, and Jibril alerted him that there was filth on them, so he took them off. He did not start over but completed his prayer, peace be upon him. This indicates that whoever prays in something containing impurity without knowing, his prayer is valid. But when he learns of it, he takes it off: if he learns during the prayer, like the sandal, he takes it off, and like the ghutrah or turban, he takes it off, or the bisht, he takes it off during the prayer and it does not harm him. But if he cannot take it off ...
The Arabic excerpts matched the original page word for word by an automated check and have not had human scholarly review. The English translations are unreviewed translations made for this site; they are not an approved Shari‘ah translation. Rely on the Arabic original.
Source
Ruling on the prayer of one who finds impurity on his garment
Title of the original page (Arabic): حكم صلاة من وجد في ثوبه نجاسة
Shaykh ‘Abd al-‘Aziz ibn Baz, may Allah have mercy on him