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:9361Abū al-Ḥasan ʿAlī b. Aḥmad b. ʿAbdān > Abū al-Qāsim Sulaymān b. Aḥmad al-Ṭabarānī > Ibn Abū Maryam > al-Firyābī > Sufyān > ʿĀṣim al-Aḥwal > Anas b. Mālik

[Machine] "Indeed, Safa and Marwa were among the rites of Jahiliyyah (pre-Islamic era), but when Islam came, we abandoned them. Then Allah revealed, 'Indeed, Safa and Marwa are among the symbols of Allah.' [Surah Al-Baqarah 2:158]"  

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

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

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

See similar narrations below:

Collected by Ḥākim
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] اللَّهِ فَمَنْ حَجَّ الْبَيْتَ أَوِ اعْتَمَرَ فَلَا جُنَاحَ عَلَيْهِ أَنْ يَطَّوَّفَ بِهِمَا وَمَنْ تَطَوَّعَ خَيْرًا الْآيَةُ  

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