Is it obligatory to repeat the prayer if mucus exits from the back passage during it, when one is not certain of its exit until immediately after finishing the prayer?
Everything that exits from the two private parts (front and back) invalidates ablution. Your prayer, during which that discharge from the anus occurred, has been invalidated, and you must repeat it if you are certain of its occurrence during the prayer.
Whoever's ritual impurity (hadath) is not continuous should delay the prayer until it ceases, unless they fear the prayer time will expire.
As for one with continuous impurity (da'im al-hadath), they should perform istinja (cleansing), clean the area, bandage it with a cloth to prevent impurity, and perform ablution for each obligatory prayer after its time has begun. Their ablution will not be invalidated by whatever exits during the prayer.
Your not interrupting the prayer due to uncertainty about something exiting is correct, based on the Prophet's (peace be upon him) saying: "No, not until he hears a sound or finds a smell." The intention here is certainty of the impurity.
Summarized from the full answer at Ftawy · reviewed Sep 2, 2026
Read the full answer on Ftawyhttps://ftawy.com/en/questions/146339