The World Federation One Stop Fiqh

Ruling 791

If a person starts performing a prayer when there is ample time, and during it he becomes aware that his body or clothing has become impure, and he deems it probable that it became impure after he started his prayer, then, in case his prayer would not be broken up by washing his body or by changing his clothing or by taking his clothing off, he must during the prayer wash his body or clothing, or change his clothing, or take his clothing off, as long as another thing covers his private parts. However, in the event that washing his body or clothing, or changing or removing his clothing, would break up the prayer, or, if by removing his clothing he would become naked, then based on obligatory precaution he must perform his prayer again with pure clothing.