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.
bukhari:4496Muḥammad b. Yūsuf > Sufyān > ʿĀṣim b. Sulaymān > Saʾalt Anas b. Mālik > al-Ṣafā And al-Marwah

I asked Anas bin Malik about Safa and Marwa. Anas replied, "We used to consider (i.e. going around) them a custom of the Pre-islamic period of Ignorance, so when Islam came, we gave up going around them. Then Allah revealed" "Verily, Safa and Marwa (i.e. two mountains at Mecca) are among the Symbols of Allah. So it is not harmful of those who perform the Hajj of the House (of Allah) or perform the Umra to ambulate (Tawaf) between them." (2.158)  

البخاري:٤٤٩٦حَدَّثَنَا مُحَمَّدُ بْنُ يُوسُفَ حَدَّثَنَا سُفْيَانُ عَنْ عَاصِمِ بْنِ سُلَيْمَانَ قَالَ سَأَلْتُ أَنَسَ بْنَ مَالِكٍ ؓ عَنِ الصَّفَا وَالْمَرْوَةِ فَقَالَ

كُنَّا نَرَى أَنَّهُمَا مِنْ أَمْرِ الْجَاهِلِيَّةِ فَلَمَّا كَانَ الإِسْلاَمُ أَمْسَكْنَا عَنْهُمَا فَأَنْزَلَ اللَّهُ تَعَالَى {إِنَّ الصَّفَا وَالْمَرْوَةَ } إِلَى قَوْلِهِ {أَنْ يَطَّوَّفَ بِهِمَا}  


See similar narrations below:

Collected by Tirmidhī, Ḥākim
tirmidhi:2966ʿAbd b. Ḥumayd > Yazīd b. Abū Ḥakīm > Sufyān > ʿĀṣim al-Aḥwal > Saʾalt Anas b. Mālik > al-Ṣafā And al-Marwah

"I asked Anas bin Malik about As-Safa and Al-Marwah, and he said: 'They were among the rites of Jahiliyyah.' He said: 'So during Islam, we refrained from them, then Allah, Blessed and Most High, revealed: Indeed As-Safa and Al-Marwah are of the symbols of Allah. So it is not a sin for those who perform Hajj or 'Umrah to the house to go between them. (2:158)' He said: 'So it is voluntarily then verily, Allah is the All-Recogniser, the All-Knowing. (2:158)'"  

Abū ʿĪsá said that this Ḥadīth is Ḥasan-Ṣaḥīḥ.
الترمذي:٢٩٦٦حَدَّثَنَا عَبْدُ بْنُ حُمَيْدٍ حَدَّثَنَا يَزِيدُ بْنُ أَبِي حَكِيمٍ عَنْ سُفْيَانَ عَنْ عَاصِمٍ الأَحْوَلِ قَالَ سَأَلْتُ أَنَسَ بْنَ مَالِكٍ عَنِ الصَّفَا وَالْمَرْوَةِ فَقَالَ

كَانَا مِنْ شَعَائِرِ الْجَاهِلِيَّةِ فَلَمَّا كَانَ الإِسْلاَمُ أَمْسَكْنَا عَنْهُمَا فَأَنْزَلَ اللَّهُ ( إِنَّ الصَّفَا وَالْمَرْوَةَ مِنْ شَعَائِرِ اللَّهِ فَمَنْ حَجَّ الْبَيْتَ أَوِ اعْتَمَرَ فَلاَ جُنَاحَ عَلَيْهِ أَنْ يَطَّوَّفَ بِهِمَا ) قَالَ هُمَا تَطَوُّعٌ (فَمَنْ تَطَوَّعَ خَيْرًا فَإِنَّ اللَّهَ شَاكِرٌ عَلِيمٌ )  

قَالَ أَبُو عِيسَى هَذَا حَدِيثٌ حَسَنٌ صَحِيحٌ
hakim:3070Abū al-ʿAbbās Muḥammad b. Yaʿqūb > Usayd b. ʿĀṣim al-Aṣbahānī > al-Ḥusayn b. Ḥafṣ > Sufyān > ʿĀṣim > Saʾalt Anas b. Mālik > al-Ṣafā And al-Marwah

"I asked Anas bin Malik about As-Safa and Al-Marwah, and he said: 'They were among the rites of Jahiliyyah.' He said: 'So during Islam, we refrained from them, then Allah, Blessed and Most High, revealed: Indeed As-Safa and Al-Marwah are of the symbols of Allah. So it is not a sin for those who perform Hajj or 'Umrah to the house to go between them. (2:158)' He said: 'So it is voluntarily then verily, Allah is the All-Recogniser, the All-Knowing. (2:158)'" (Using translation from Tirmidhī 2966)   

الحاكم:٣٠٧٠حَدَّثَنَا أَبُو الْعَبَّاسِ مُحَمَّدُ بْنُ يَعْقُوبَ ثنا أُسَيْدُ بْنُ عَاصِمٍ الْأَصْبَهَانِيُّ ثنا الْحُسَيْنُ بْنُ حَفْصٍ عَنْ سُفْيَانَ عَنْ عَاصِمٍ قَالَ سَأَلْتُ أَنَسَ بْنَ مَالِكٍ عَنِ الصَّفَا وَالْمَرْوَةِ قَالَ

كَانَتَا مِنْ مَشَاعِرِ الْجَاهِلِيَّةِ فَلَمَّا كَانَ الْإِسْلَامُ أَمْسَكْنَا عَنْهُمَا فَأَنْزَلَ اللَّهُ {إِنَّ الصَّفَا وَالْمَرْوَةَ مِنْ شَعَائِرِ} [البقرة 158] اللَّهِ فَمَنْ حَجَّ الْبَيْتَ أَوِ اعْتَمَرَ فَلَا جُنَاحَ عَلَيْهِ أَنْ يَطَّوَّفَ بِهِمَا وَمَنْ تَطَوَّعَ خَيْرًا الْآيَةُ  

«هَذَا حَدِيثٌ صَحِيحٌ عَلَى شَرْطِ الشَّيْخَيْنِ وَلَمْ يُخَرِّجَاهُ» على شرط البخاري ومسلم