I asked Anas bin Malik about Safa and Marwa. He said, "We used to consider them part of the practices of the Days of Ignorance, so when Islam came, we refrained from them. Then Allah the Exalted revealed, 'Indeed, Safa and Marwa are among the symbols of Allah. So whoever makes Hajj to the House or performs Umrah, there is no blame upon him for walking between them' [Baqarah 2:158]."
حدثنا محمد بن يوسف حدثنا سفيان
سألت أنس بن مالك رضي الله عنه عن الصفا والمروة فقال كنا نرى أنهما من أمر الجاهلية فلما كان الإسلام أمسكنا عنهما فأنزل الله تعالى {إن الصفا والمروة من شعائر الله فمن حج البيت أو اعتمر فلا جناح عليه أن يطوف بهما}