Sunan an-Nasa'i, Volume 3, Book 24, Hadith 2963 (DarusSalam)

It was narrated that Amr - meaning, bin Umar - said: "The Messenger of Allah came and circumambulated the House seven times, then he prayed two Rakahs behind the Maqam and performed Sai between As-Safa and Al-Marwah, and he said: 'Indeed in the Messenger of Allah you have a good example to follow."

أَخْبَرَنَا قُتَيْبَةُ، قَالَ حَدَّثَنَا سُفْيَانُ، عَنْ عَمْرٍو، قَالَ يَعْنِي ابْنَ عُمَرَ قَدِمَ رَسُولُ اللَّهِ صلى الله عليه وسلم فَطَافَ بِالْبَيْتِ سَبْعًا وَصَلَّى خَلْفَ الْمَقَامِ رَكْعَتَيْنِ وَطَافَ بَيْنَ الصَّفَا وَالْمَرْوَةِ وَقَالَ ‏{‏ لَقَدْ كَانَ لَكُمْ فِي رَسُولِ اللَّهِ أُسْوَةٌ حَسَنَةٌ ‏}‏ ‏.‏

sunnah.com