Language:
كتاب الحج
25  
Hajj (Pilgrimage)
(80)
Chapter: Sa'i between As-Safa and Al-Marwa
(80)
باب مَا جَاءَ فِي السَّعْىِ بَيْنَ الصَّفَا وَالْمَرْوَةِ
Sahih al-Bukhari 1648

Narrated `Asim:

I asked Anas bin Malik: "Did you use to dislike to perform Tawaf between Safa and Marwa?" He said, "Yes, as it was of the ceremonies of the days of the Pre-Islamic period of ignorance, till Allah revealed: 'Verily! (The two mountains) As-Safa and Al-Marwa are among the symbols of Allah. It is therefore no sin for him who performs the pilgrimage to the Ka`ba, or performs `Umra, to perform Tawaf between them.' " (2.158)

حَدَّثَنَا أَحْمَدُ بْنُ مُحَمَّدٍ، أَخْبَرَنَا عَبْدُ اللَّهِ، أَخْبَرَنَا عَاصِمٌ، قَالَ قُلْتُ لأَنَسِ بْنِ مَالِكٍ ـ رضى الله عنه ـ أَكُنْتُمْ تَكْرَهُونَ السَّعْىَ بَيْنَ الصَّفَا وَالْمَرْوَةِ قَالَ نَعَمْ‏.‏ لأَنَّهَا كَانَتْ مِنْ شَعَائِرِ الْجَاهِلِيَّةِ، حَتَّى أَنْزَلَ اللَّهُ ‏{‏إِنَّ الصَّفَا وَالْمَرْوَةَ مِنْ شَعَائِرِ اللَّهِ فَمَنْ حَجَّ الْبَيْتَ أَوِ اعْتَمَرَ فَلاَ جُنَاحَ عَلَيْهِ أَنْ يَطَّوَّفَ بِهِمَا‏}‏‏.‏
Reference : Sahih al-Bukhari 1648
In-book reference : Book 25, Hadith 129
USC-MSA web (English) reference : Vol. 2, Book 26, Hadith 710
  (deprecated numbering scheme)