From Sahih 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
Reference: Bukhari 1627