Sayyiduna Abu Hurayrah (may Allah be pleased with him) said that the Prophet (peace and blessings be upon him) performed three sets of seven circuits of the House together, then came to the Maqam and offered six rak'ahs behind it, giving salam to the right and left after every two rak'ahs. Abu Hurayrah said: He wanted to teach us.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الحج / 9434