Sahih al-Bukhari
Narration text is preserved in its supplied Arabic and English. Translated interfaces and reading guides do not add narration translations in other languages.
حَدَّثَنَا مُحَمَّدُ بْنُ يُوسُفَ، حَدَّثَنَا سُفْيَانُ، عَنْ عَاصِمِ بْنِ سُلَيْمَانَ، قَالَ سَأَلْتُ أَنَسَ بْنَ مَالِكٍ ـ رضى الله عنه ـ عَنِ الصَّفَا، وَالْمَرْوَةِ،. فَقَالَ كُنَّا نَرَى أَنَّهُمَا مِنْ أَمْرِ الْجَاهِلِيَّةِ، فَلَمَّا كَانَ الإِسْلاَمُ أَمْسَكْنَا عَنْهُمَا، فَأَنْزَلَ اللَّهُ تَعَالَى {إِنَّ الصَّفَا وَالْمَرْوَةَ } إِلَى قَوْلِهِ {أَنْ يَطَّوَّفَ بِهِمَا}.
Narrated `Asim bin Sulaiman:
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)
Full reference and source
Sahih al-Bukhari USC-MSA web (English) : Vol. 6, Book 60, Hadith 23 Arabic : Book 65, Hadith 4496
View source on Sunnah.com (opens in a new tab)