Doubts regarding cleanliness in namaz

Is it necessary to renew prayers if a person finds impurity (najasah) on one’s clothes and does not know when it appeared?
If impurity is found on one’s clothes and it is not known when it got there, it is necessary to renew only those prayers regarding which there is confidence that they were performed in the presence of impurity. And if there is an assumption that impurity on the clothes occurred after the performance of namaz, performing the prayer again is not necessary, although desirable.
If impurity could occur on clothing at a time about which there is uncertainty, e.g. that it could have happened when visiting a barn either in the morning or in the evening, then the appearance of the impurity should be attributed to the later time. In this case, if we can say for sure that it was observed in the evening but that maybe it actually got there in the morning, it is obligatory to compensate the prayers made after the evening namaz, while is desirable to compensate for those prayers performed from morning to until evening.
“It is imperative to renew all prayers, if a person is sure that they were performed in the presence of impurity. However, if there is a likelihood that that impurity appeared after performing namaz, it is not necessary to renew this prayer, although it is desirable.” [1]
“If there is the possibility that impurity fell on clothing after performing prayer, it is not necessary to compensate for this prayer, as the rule says that that which has newly appeared must be attributed to the recent past.” [2]
Sources:
- [1] Nihaya al-Muhtaj, vol. 2, p. 34
- [2] Hashiya al-Jamal, vol. 1, p. 424