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.
bayhaqi:749Abū ʿAbdullāh al-Ḥāfiẓ > Abū Bakr Aḥmad b. Isḥāq al-Faqīh > Bishr b. Mūsá > al-Ḥumaydī > Sufyān > al-Zuhrī > Saʿīd b. al-Musayyib And ʿAbbād b. Tamīm from his uncle ʿAbdullāh b. Zayd

[Machine] The man complained to the Messenger of Allah ﷺ that something came to his mind during prayer. The Messenger of Allah ﷺ said, "He should not move until he hears a sound or smells a fragrance."  

البيهقي:٧٤٩أَخْبَرَنَا أَبُو عَبْدِ اللهِ الْحَافِظُ ثنا أَبُو بَكْرٍ أَحْمَدُ بْنُ إِسْحَاقَ الْفَقِيهُ أنا بِشْرُ بْنُ مُوسَى ثنا الْحُمَيْدِيُّ ثنا سُفْيَانُ أنا الزُّهْرِيُّ أَخْبَرَنَا سَعِيدُ بْنُ الْمُسَيِّبِ وَعَبَّادُ بْنُ تَمِيمٍ عَنْ عَمِّهِ عَبْدِ اللهِ بْنِ زَيْدٍ قَالَ

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

رَوَاهُ الْبُخَارِيُّ فِي الصَّحِيحِ عَنْ عَلِيِّ بْنِ الْمَدِينِيِّ وَغَيْرِهِ وَرَوَاهُ مُسْلِمٌ عَنْ عَمْرٍو النَّاقِدِ وَغَيْرِهِ كُلُّهُمْ عَنْ سُفْيَانَ بْنِ عُيَيْنَةَ

See similar narrations below:

Collected by Bayhaqī
bayhaqi:555Abū ʿAbdullāh al-Ḥāfiẓ And ʾAbū Saʿīd b. Abū ʿAmr Waghayruhumā > Abū al-ʿAbbās Muḥammad b. Yaʿqūb > al-Rabīʿ b. Sulaymān > al-Shāfiʿī > Sufyān > al-Zuhrī > ʿAbbād b. Tamīm from his uncle ʿAbdullāh b. Zayd > Shukī > Rasūl

[Machine] The man complained to the Messenger of Allah ﷺ that something occurs to him during prayer. The Prophet ﷺ said, "Do not break your prayer until you hear a sound or smell an odor." Ash-Shafi'i said in the narration of Abu Sa'id, "When the Sunnah proved that the man should leave the prayer due to a smell, the smell was from the path of excrement, and there was more of it."  

البيهقي:٥٥٥أَخْبَرَنَا أَبُو عَبْدِ اللهِ الْحَافِظُ وَأَبُو سَعِيدِ بْنُ أَبِي عَمْرٍو وَغَيْرُهُمَا قَالُوا أنا أَبُو الْعَبَّاسِ مُحَمَّدُ بْنُ يَعْقُوبَ أنا الرَّبِيعُ بْنُ سُلَيْمَانَ أنا الشَّافِعِيُّ أنا سُفْيَانُ أنا الزُّهْرِيُّ أَخْبَرَنِي عَبَّادُ بْنُ تَمِيمٍ عَنْ عَمِّهِ عَبْدِ اللهِ بْنِ زَيْدٍ قَالَ

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

رَوَاهُ الْبُخَارِيُّ فِي الصَّحِيحِ عَنْ عَلِيِّ بْنِ الْمَدِينِيِّ وَغَيْرِهِ وَرَوَاهُ مُسْلِمٌ عَنْ عَمْرٍو النَّاقِدِ وَغَيْرِهِ كُلُّهُمْ عَنْ سُفْيَانَ بْنِ عُيَيْنَةَ