Sayyiduna Abu Sa'id al-Khudri (may Allah be pleased with him) reports that the Prophet (peace and blessings be upon him) said: "Satan comes to one of you while he is praying and pulls a hair near his back passage, so the man feels as though he has incurred hadath (ritual impurity). (Such) a man should not end the prayer until he hears the sound (of wind passing) or perceives a smell."
Abu Ya'la recorded it, and Ibn Majah recorded it in abridged form; its chain contains a narrator, Ali bin Zayd, about whose use as evidence there is disagreement.
Hadith Referenceمجمع الزوائد ومنبع الفوائد / كتاب الطهارة / 1249
Hadith Gradingمحدثین:إسنادہ ضعیف
Hadith Takhrij«أخرجه سنن ابن ماجه برقم: 514، وأخرجه مسند أحمد برقم: 11502، وأخرجه معرفة السنن والآثار برقم: 15382»