When the Messenger of Allah ﷺ arrived in Mecca, he circled the Kaaba seven times, then prayed two rakahs at the Station of Ibrahim. He then went out to Safa through the gate that leads to it, and made the ritual walk between Safa and Marwa.He said, Ayub informed me, from Amr bin Dinar, from Ibn Umar, that he said, "This is the established practice."
حدثنا محمد بن جعفر حدثنا شعبة عن عمرو بن دينار سمعت
لما قدم رسول الله ﷺ مكة طاف بالبيت سبعا ثم صلى عند المقام ركعتين ثم خرج إلى الصفا من الباب الذي يخرج إليه فطاف بالصفا والمروة قال وأخبرني أيوب عن عمرو بن دينار عن ابن عمر أنه قال هو سنة