Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
suyuti:2418a

The Messenger of Allah ﷺ said: If any one of you offers prayer and feels a movement between his paddocks, but is doubtful whether or not his ablution broke, he should not cease praying unless he hears a sound or perceives a smell. (Using translation from Abū Dāʾūd 177)   

السيوطي:٢٤١٨a

"إِذا كانَ أَحدُكُمُ ثم في الصَّلاةِ فوجَدَ حركة في دُبُرِه أَحْدَثَ أَو لمْ يُحْدِثْ فأشْكلَ عليه فلا ينْصرف حتَّى يسْمعَ صوْتًا أَو يجدَ ريحًا".  

[د] أبو داود [ق] البيهقى في السنن عن أبي هريرة

See similar narrations below:

Collected by Abū Dāwūd, Aḥmad, Dārimī, Bayhaqī
abudawud:177Mūsá b. Ismāʿīl > Ḥammād > Suhayl b. Abū Ṣāliḥ from his father > Abū Hurayrah

The Messenger of Allah ﷺ said: If any one of you offers prayer and feels a movement between his paddocks, but is doubtful whether or not his ablution broke, he should not cease praying unless he hears a sound or perceives a smell.  

أبو داود:١٧٧حَدَّثَنَا مُوسَى بْنُ إِسْمَاعِيلَ حَدَّثَنَا حَمَّادٌ أَخْبَرَنَا سُهَيْلُ بْنُ أَبِي صَالِحٍ عَنْ أَبِيهِ عَنْ أَبِي هُرَيْرَةَ

أَنَّ رَسُولَ اللَّهِ ﷺ قَالَ إِذَا كَانَ أَحَدُكُمْ فِي الصَّلاَةِ فَوَجَدَ حَرَكَةً فِي دُبُرِهِ أَحْدَثَ أَوْ لَمْ يُحْدِثْ فَأَشْكَلَ عَلَيْهِ فَلاَ يَنْصَرِفْ حَتَّى يَسْمَعَ صَوْتًا أَوْ يَجِدَ رِيحًا  

ahmad:9355ʿAffān > Ḥammād b. Salamah > Suhayl b. Abū Ṣāliḥ from his father > Abū Hurayrah

The Messenger of Allah ﷺ said: If any one of you offers prayer and feels a movement between his paddocks, but is doubtful whether or not his ablution broke, he should not cease praying unless he hears a sound or perceives a smell. (Using translation from Abū Dāʾūd 177)  

أحمد:٩٣٥٥حَدَّثَنَا عَفَّانُ حَدَّثَنَا حَمَّادُ بْنُ سَلَمَةَ قَالَ حَدَّثَنَا سُهَيْلُ بْنُ أَبِي صَالِحٍ عَنْ أَبِيهِ عَنْ أَبِي هُرَيْرَةَ

أَنَّ رَسُولَ اللهِ ﷺ قَالَ إِذَا وَجَدَ أَحَدُكُمْ فِي صَلَاتِهِ حَرَكَةً فِي دُبُرِهِ فَأَشْكَلَ عَلَيْهِ أَحْدَثَ أَوْ لَمْ يُحْدِثْ فَلَا يَنْصَرِفْ حَتَّى يَسْمَعَ صَوْتًا أَوْ يَجِدَ رِيحًا  

darimi:748Yaḥyá b. Ḥassān > Ḥammād b. Salamah > Suhayl b. Abū Ṣāliḥ from his father > Abū Hurayrah

The Messenger of Allah ﷺ said: If any one of you offers prayer and feels a movement between his paddocks, but is doubtful whether or not his ablution broke, he should not cease praying unless he hears a sound or perceives a smell. (Using translation from Abū Dāʾūd 177)   

الدارمي:٧٤٨أَخْبَرَنَا يَحْيَى بْنُ حَسَّانَ حَدَّثَنَا حَمَّادُ بْنُ سَلَمَةَ عَنْ سُهَيْلِ بْنِ أَبِي صَالِحٍ عَنْ أَبِيهِ عَنْ أَبِي هُرَيْرَةَ

أَنَّ رَسُولَ اللَّهِ ﷺ قَالَ «إِذَا وَجَدَ أَحَدُكُمْ فِي صَلَاتِهِ حَرَكَةً فِي دُبُرِهِ فَأَشْكَلَ عَلَيْهِ أَحْدَثَ أَوْ لَمْ يُحْدِثْ فَلَا يَنْصَرِفَنَّ حَتَّى يَسْمَعَ صَوْتًا أَوْ يَجِدَ رِيحًا»  

bayhaqi:3376Abū ʿAlī al-Rūdhbārī > Muḥammad b. Bakr > Abū Dāwud > Mūsá b. Ismāʿīl > Ḥammād > Suhayl b. Abū Ṣāliḥ from his father > Abū Hurayrah

[Machine] The Messenger of Allah ﷺ said, "If one of you is in prayer and feels movement in his behind, whether intentional or unintentional, he should not leave his prayer until he hears a sound or finds a smell. This is evidence that he should leave if he hears a sound or finds a smell, there is no difference between whether it was deliberate, a mistake, or a previously passed wind. Allah knows best."  

البيهقي:٣٣٧٦وَأَخْبَرَنَا أَبُو عَلِيٍّ الرُّوذْبَارِيُّ أنبأ مُحَمَّدُ بْنُ بَكْرٍ ثنا أَبُو دَاوُدَ ثنا مُوسَى بْنُ إِسْمَاعِيلَ ثنا حَمَّادٌ أنبأ سُهَيْلُ بْنُ أَبِي صَالِحٍ عَنْ أَبِيهِ عَنْ أَبِي هُرَيْرَةَ ؓ

أَنَّ رَسُولَ اللهِ ﷺ قَالَ إِذَا كَانَ أَحَدُكُمْ فِي الصَّلَاةِ فَوَجَدَ حَرَكَةً فِي دُبُرِهِ أَحْدَثَ أَوْ لَمْ يُحَدِثْ فَأُشْكِلَ عَلَيْهِ فَلَا يَنْصَرِفْ حَتَّى يَسْمَعَ صَوْتًا أَوْ يَجِدَ رِيحًا وَفِي هَذَا دَلِيلٌ عَلَى أَنَّهُ يَنْصَرِفُ إِذَا سَمِعَ صَوْتًا أَوْ وَجَدَ رِيحًا لَا فَرْقَ فِيهِ بَيْنَ عَمْدِهِ وَسَهْوِهِ وَسَبْقِهِ وَاللهُ أَعْلَمُ