He invalidates his purity during tawaf (circumambulation)
If a person relieves himself during tawaf, either by passing gas, or urine, or reproductive fluid, or he touches his anus, or what resembles this, then his tawaf is broken like the prayer, then he must go and purify himself and then resume the tawaaf. The question has some difference in opinion, but this is