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."
Sahih al-Bukhari Book 25, Hadith 111