The Prophet ﷺ arrived and circled the House seven times, then prayed two units of prayer behind the Station, and afterward went out to Safa. Allah the Exalted has said, "Indeed, you have in the Messenger of Allah an excellent example to follow" [Ahzab 33:21].
قدم النبي ﷺ فطاف بالبيت سبعا وصلى خلف المقام ركعتين ثم خرج إلى الصفا وقد قال الله تعالى: {لقد كان لكم في رسول الله أسوة حسنة} [سورة الأحزاب: ٢١].
Bukhari related it in the Hajj chapter (1627) from Adam, who said, Shuba narrated to us, Amr bin Dinar narrated to us, he said, I heard Ibn Umar, and he mentioned it.Bukhari also related it in the Hajj chapter (1623, 1644), and Muslim in the Hajj chapter (1234:189), by way of Sufyan bin Uyayna, from Amr bin Dinar, who said, We asked Ibn Umar about a man who performed tawaf around the House during an umrah but had not walked between Safa and Marwa, whether he could go to his wife. He said, (and he mentioned it).Bukhari added, We also asked Jabir bin Abdullah
, and he said, "He must not go near her until he has walked between Safa and Marwa."