Sahih al-Bukhari, Hadith 1627 ⓘ
Narrated Ibn `Umar: The Prophet reached Mecca, circumambulated the Ka`ba seven times and then offered a two rak`at prayer behind Maqam Ibrahim. Then he went towards the Safa. Allah has said, "Verily, in Allah's Apostle you have a good example."
حَدَّثَنَا آدَمُ، حَدَّثَنَا شُعْبَةُ، حَدَّثَنَا عَمْرُو بْنُ دِينَارٍ، قَالَ سَمِعْتُ ابْنَ عُمَرَ ـ رضى الله عنهما ـ يَقُولُ قَدِمَ النَّبِيُّ صلى الله عليه وسلم فَطَافَ بِالْبَيْتِ سَبْعًا وَصَلَّى خَلْفَ الْمَقَامِ رَكْعَتَيْنِ، ثُمَّ خَرَجَ إِلَى الصَّفَا، وَقَدْ قَالَ اللَّهُ تَعَالَى {لَقَدْ كَانَ لَكُمْ فِي رَسُولِ اللَّهِ أُسْوَةٌ حَسَنَةٌ}.
also referenced under: Book 25, Hadith 111 (In-Book) & Volume 2, Book 26, Hadith 693 (USC-MSA)