Sayyiduna Ibn Abbas (may Allah be pleased with them both) said: The Sunnah for one who comes to Makkah is that he performs the circumambulation of the House and the sa'y between al-Safa and al-Marwah before going out to Arafat; and the Sunnah for one who lives in Makkah is that he performs the circumambulation of the House and the sa'y between al-Safa and al-Marwah after returning from Mina.
Hadith Referenceالمعجم الكبير للطبراني / باب العين / 11359