Sahih al-Bukhari, Book 25, Hadith 111 (Bukhari 1571)

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."