Ayesha reported,

"I do not see any blame upon me if I do not walk between Safa and Marwa."She replied, "Allah says, '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]. If it were as you say, it would have read, 'there is no blame upon him if he does not walk between them.' This verse was revealed only concerning some people from the Ansar who, when they entered into ihram, used to do so for the idol Manat, so it was not lawful for them to walk between Safa and Marwa. When they came with the Prophet ﷺ for Hajj, they mentioned this to him, and Allah revealed this verse. By my life, Allah عز وجل does not consider complete the Hajj of one who does not walk between Safa and Marwa."

Ibn Majah 2986

Sahih

حدثنا أبو بكر بن أبي شيبة حدثنا أبو أسامة عن هشام بن عروة أخبرني أبي قال

قلت لعائشة

ما أرى علي جناحا أن لا أطوف بين الصفا والمروة قالت إن الله يقول {إن الصفا والمروة من شعائر الله فمن حج البيت أو اعتمر فلا جناح عليه أن يطوف بهما} ولو كان كما تقول لكان فلا جناح عليه أن لا يطوف بهما إنما أنزل هذا في ناس من الأنصار كانوا إذا أهلوا أهلوا لمناة فلا يحل لهم أن يطوفوا بين الصفا والمروة فلما قدموا مع النبي ﷺ في الحج ذكروا ذلك له فأنزلها الله فلعمري ما أتم الله عز وجل حج من لم يطف بين الصفا والمروة

ابن ماجه 2986صحيح
Contents
Reference
Commentary
Ayat
Collection
Sunan Ibn Majah
Book
Rites of pilgrimage
Chapter
Walking between Safa and Marwa
Numbering
Darussalam 2986
Ibn Majah 2986