Abu al-Tufayl said: Sayyiduna Ibn Abbas (may Allah be pleased with them both) came to me, and I said: O Abu Abbas - or O Ibn Abbas - your people claim that the Messenger of Allah (peace and blessings be upon him) performed raml (brisk walking), and that it is a Sunnah. He said: They spoke both truth and falsehood. He (peace and blessings be upon him) did perform raml, but it is not a Sunnah. Rather, the Messenger of Allah (peace and blessings be upon him) and his (peace and blessings be upon him) Companions came (to Makkah) while the polytheists were on Mount Qu'ayqi'an, and news reached him (peace and blessings be upon him) that they were saying that he (peace and blessings be upon him) and his Companions had become weak. So he (peace and blessings be upon him) ordered them to perform raml in order to show them that they had strength.
Hadith Referenceالمعجم الكبير للطبراني / باب العين / 10579