The Messenger of Allah ﷺ and his companions arrived in Mecca after the fever of Yathrib had weakened them. The polytheists said, "Tomorrow there will come to you a people whom the fever has weakened and who have suffered greatly from it." So they gathered on the side facing the Hijr.The Prophet ﷺ ordered them to jog briskly during three circuits and to walk between the two corners, so that the polytheists might see their strength. The polytheists then said, "These are the ones you claimed the fever had weakened? They are stronger than such and such."Ibn Abbas said, "Nothing prevented him from ordering them to jog during all of the circuits except his concern to spare them."
قدم رسول الله ﷺ وأصحابه مكة، وقد وهنتهم حمى يثرب، قال المشركون: إنه يقدم عليكم غدا قوم قد وهنتهم الحمى، ولقوا منها شدة، فجلسوا مما يلي الحجر، وأمرهم النبي ﷺ أن يرملوا ثلاثة أشواط، ويمشوا ما بين الركنين، ليرى المشركون جلدهم، فقال المشركون: هؤلاء الذين زعمتم أن الحمى قد وهنتهم، هؤلاء أجلد من كذا وكذا، قال ابن عباس: ولم يمنع أن يأمرهم أن يرملوا الأشواط كلها، إلا الإبقاء عليهم.
Bukhari narrated it in the Book of Military Expeditions (4256), and Muslim narrated it in the Book of Hajj (240:1266), both of them through Hammad bin Zayd, from Ayub, from Saeed bin Jubayr, from Ibn Abbas, who said, then he narrated it. Regarding His words, "shaving your heads or cutting your hair short" [Fath 48:27]