Sayyiduna Abdullah bin Umar (may Allah be pleased with them both) says: When the Prophet (peace and blessings be upon him) came to Makkah, he performed Tawaf. First of all he kissed the Black Stone, then he did three rounds at a brisk pace and four walking. Then, having completed the Tawaf, he prayed two rak'ahs by Maqam Ibrahim. When he had said the salam, he came to Safa and made seven rounds between Safa and Marwah. Then nothing of what had become forbidden to him (peace and blessings be upon him) became lawful until he (peace and blessings be upon him) had completed his Hajj and sacrificed on the Day of Sacrifice. Then he went back and performed Tawaf of the House, and then everything that had been forbidden to him (peace and blessings be upon him) became lawful. And the people who had brought sacrificial animals with them did the same.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الحج / 9647