The Prophet (peace and blessings be upon him) said:
"When one of you, during his prayer, perceives the sound of passing wind or a disturbance in his stomach, let him withdraw (from the prayer) and perform ablution."
Hadith Referenceصحیح الجامع الصغیر / حرف الألف / 823
Hadith Gradingالألبانی:صحيح
Hadith Takhrij[طس] عن ابن عمر. الأحاديث الصحيحة ١٤١٤.