Sayyiduna Anas bin Malik (may Allah be pleased with him) said: Safa and Marwah were among the rites of the Jahiliyyah; when Islam came, we refrained from them, so Allah Almighty revealed this verse: "Indeed, Safa and Marwah are among the symbols of Allah." [Surah Al-Baqarah: 158]
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الحج / 9361