Answer
Wa `alaykum as-salamu wa rahmatullahi wa barakatuh.
In the Name of Allah, the Most Gracious, the Most Merciful.
All praise and thanks are due to Allah, and may the peace and blessings of Allah be upon His Messenger.
In this fatwa:
Whoever prays forgetting that he did not have wudu has to repeat the Prayer.
With regard to your question, the late Sheikh Ibn `Uthaymeen, a prominent Saudi scholar (may Allah shower mercy on his soul), states,
Purification is a condition for the validity of Prayer. Wudu should be made with pure water. Allah says in the Quran, {O you who believe, when you rise for prayer, wash your faces and your hands up to the elbows and lightly rub your heads and (wash) your feet up to the ankles.} (Al-Mai’dah 5:6)
Whoever prays forgetting that he did not have wudu has to repeat the Prayer.
Abu Hurairah (may Allah be pleased with him) reported that the Messenger (peace and blessings be upon him) said, “Allah does not accept any Prayer if a person breaks his wudu’, until he does wudu’.” (Al-Bukhari)
This is in contrast to the person who has some impurity on his clothes and forgets it. He does not have to repeat his Prayer.
Abu Said Al-Khudri (may Allah be pleased with him) reported that Jibreel came to the Prophet while he was praying and told him that there was something dirty on his shoes. He took them off and continued praying. (Ahmad)
This hadith proves that the one who is unaware of the impurity does not have to repeat his Prayer, and this applies also to the one who forgets that there is some impurity present.
Allah Almighty knows best.
Editor’s note: This fatwa is from Ask the Scholar’s archive and was originally published at an earlier date.
Source: Excerpted with modifications from: www.islamqa.info.