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.
hakim:5643ʿAbd al-Bāqī b. Qāniʿ > Ibrāhīm b. Aḥmad b. ʿUmar al-Wakīʿī > Ḥassān b. Ibrāhīm > Muḥammad b. Salamah b. Kuhayl > al-Mughīrah b. ʿAbdullāh al-Yashkurī > Qays b. Abū Ḥāzim > Khabbāb

[Machine] I came to the Messenger of Allah ﷺ while he was lying down under a tree, placing his hand under his head. So, I said, "O Messenger of Allah, don't you pray to Allah against those people who made us fear that they would turn us away from our religion?" He turned his face away from me three times, each time I said that, he turned his face away from me. Then he sat up on the third time and said, "O people, fear Allah and be patient. By Allah, if a man from the believers before you was placed with a saw placed on his head and he was split into two, he would not turn away from his religion. Fear Allah, for Allah provides a way out and is the Maker."  

الحاكم:٥٦٤٣حَدَّثَنَا عَبْدُ الْبَاقِي بْنُ قَانِعٍ ثَنَا إِبْرَاهِيمُ بْنُ أَحْمَدُ بْنُ عُمَرَ الْوَكِيعِيُّ ثَنَا حَسَّانُ بْنُ إِبْرَاهِيمَ ثَنَا مُحَمَّدُ بْنُ سَلَمَةَ بْنِ كُهَيْلٍ عَنِ الْمُغِيرَةِ بْنِ عَبْدِ اللَّهِ الْيَشْكُرِيِّ عَنْ قَيْسِ بْنِ أَبِي حَازِمٍ عَنْ خَبَّابٍ قَالَ

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

هَذَا حَدِيثٌ صَحِيحُ الْإِسْنَادِ وَلَمْ يُخَرِّجَاهُ صحيح

See similar narrations below:

Collected by Ṭabarānī
tabarani:3648Ibrāhīm b. Aḥmad al-Wakīʿī > al-Azraq b. ʿAlī > Ḥassān b. Ibrāhīm > Muḥammad b. Salamah b. Kuhayl from his father > al-Mughīrah > Qays > Khabbāb

[Machine] I came to the Messenger of Allah ﷺ while he was lying down under a tree with his hand placed under his head. So, I said, "O Messenger of Allah, do you not supplicate to Allah against these people who have made us fear that they will turn us away from our religion?" He turned his face away from me, and I approached him, but he turned his face away from me three times. All that time, I was saying to him, and he would turn his face away from me. Then he sat up in the third time, and said, "O people, fear Allah! By Allah, if a man among the believers were to be dipped in a river of molten lead, and then he were to endure the pain caused by being severed with a pair of scissors, his religion would not falter. Fear Allah, for Allah is opening up his way for you and providing for you."  

الطبراني:٣٦٤٨حَدَّثَنَا إِبْرَاهِيمُ بْنُ أَحْمَدَ الْوَكِيعِيُّ ثنا الْأَزْرَقُ بْنُ عَلِيٍّ ثنا حَسَّانُ بْنُ إِبْرَاهِيمَ ثنا مُحَمَّدُ بْنُ سَلَمَةَ بْنِ كُهَيْلٍ عَنْ أَبِيهِ عَنِ الْمُغِيرَةِ عَنْ قَيْسٍ عَنْ خَبَّابٍ قَالَ

أَتَيْتُ رَسُولَ اللهِ ﷺ وَهُوَ مُضْطَجِعٌ تَحْتَ شَجَرَةٍ وَاضِعٌ يَدَهُ تَحْتَ رَأْسِهِ فَقُلْتُ يَا رَسُولَ اللهِ أَلَا تَدْعُو اللهَ عَلَى هَؤُلَاءِ الْقَوْمِ الَّذِينَ قَدْ خَشِينَا أَنْ يَرُدُّونا عَنْ دِينِنَا؟ قَالَ فَصَرَفَ وَجْهَهُ عَنِّي فَتَحَوَّلْتُ إِلَيْهِ فَصَرَفَ وَجْهَهُ عَنِّي ثَلَاثَ مَرَّاتٍ كُلُّ ذَلِكَ أَقُولُ لَهُ فَيَصْرِفُ وَجْهَهُ عَنِّي فَجَلَسَ فِي الثَّالِثَةِ ثُمَّ قَالَ «أَيُّهَا النَّاسُ اتَّقُوا اللهَ فَوَاللهِ إِنْ كَانَ الرَّجُلُ مِنَ الْمُؤْمِنِينَ قَبْلَكُمْ لَيُوضَعُ الْمِنْشَارُ عَلَى رَأْسِهِ فَيُشَقُّ بِاثْنَيْنِ وَمَا يَرْتَدُّ عَنْ دِينِهِ اتَّقُوا اللهَ فَإِنَّ اللهَ ﷻ فَاتِحٌ لَكُمْ وصَانِعٌ»