Sahih Muslim 1278
Sahih Muslim · Book 15: The Book of Pilgrimage · Clarifying that Sa'i between As-safa and Al-Marwah is a pillar of Hajj, without which Hajj is not valid
Anas (Allah be pleased with him) reported that the Ansar felt reluctant that they should circumambulate between al-Safa' and al-Marwa until it was revealed:
وَحَدَّثَنَا أَبُو بَكْرِ بْنُ أَبِي شَيْبَةَ، حَدَّثَنَا أَبُو مُعَاوِيَةَ ، عَنْ عَاصِمٍ ، عَنْ أَنَسٍ ، قَالَ كَانَتِ الأَنْصَارُ يَكْرَهُونَ أَنْ يَطُوفُوا بَيْنَ الصَّفَا وَالْمَرْوَةِ حَتَّى نَزَلَتْ { إِنَّ الصَّفَا وَالْمَرْوَةَ مِنْ شَعَائِرِ اللَّهِ فَمَنْ حَجَّ الْبَيْتَ أَوِ اعْتَمَرَ فَلاَ جُنَاحَ عَلَيْهِ أَنْ يَطَّوَّفَ بِهِمَا}
" Verily al-Safa' and al-Marwa are among the Signs of Allah" ; so whoever performs Hajj or 'Umra, for him there is no harm that he should circumambulate between them.