[Machine] While we were walking with the Messenger of Allah ﷺ , the people asked him, "Which actions are the best, O Messenger of Allah?" The Messenger of Allah ﷺ replied, "Belief in Allah and His Messenger, striving in the cause of Allah, and performing the accepted Hajj." Then, he heard a call in the valley saying, "I bear witness that there is no god but Allah and that Muhammad is the Messenger of Allah." The Messenger of Allah ﷺ said, "I also bear witness, and whoever bears witness to it shall be saved from polytheism." The wording of the hadith is from Ahmad ibn Salih.
بَيْنَمَا نَحْنُ نَسِيرُ مَعَ رَسُولِ اللهِ ﷺ إِذْ سَمِعَ الْقَوْمَ وَهُمْ يَقُولُونَ أَيُّ الْأَعْمَالِ أَفْضَلُ يَا رَسُولَ اللهِ؟ قَالَ رَسُولُ اللهِ ﷺ «إِيمَانٌ بِاللهِ وَرَسُولِهِ وَجِهَادٌ فِي سَبِيلِ اللهِ وَحَجٌّ مَبْرُورٌ» ثُمَّ سَمِعَ نِدَاءً فِي الْوَادِي يَقُولُ أَشْهَدُ أَنْ لَا إِلَهَ إِلَّا اللهُ وَأَنَّ مُحَمَّدًا رَسُولُ اللهِ فَقَالَ رَسُولُ اللهِ ﷺ «وَأَنَا أَشْهَدُ وَأَنَا أَشْهَدُ لَا يَشْهَدُهَا أَحَدٌ إِلَّا بَرِئَ مِنَ الشِّرْكِ» وَاللَّفْظُ لِحَدِيثِ أحْمَدَ بْنِ صَالِحٍ