A pilgrim may perform sa`i between Safa and Marwah by either riding or walking, but walking is preferable. Sheikh Sayyed Sabiq states in his well-known book, Fiqh Us-Sunnah: Sa`i may be performed by either riding or walking, but walking is preferable. In the hadith narrated by ibn `Abbas we find that the Prophet (peace and blessings be upon him) performed sa`i on foot, but when the overcrowding increased and he found that the people wanted to know more about their religion, he rode his mount so that they could see him and ask about anything they wanted.
Abu at-Tufayl asked ibn `Abbas, “Tell me about sa`i between Safa and Marwah—is it (really) sunnah to perform it riding as your people claim?” Ibn `Abbas replied, “They are right, and they are wrong.” Then he added, “The people crowded around the Prophet (peace and blessings be upon him), saying, ‘This is (Prophet) Muhammad! This is (Prophet) Muhammad!’ Even the young girls came out of their houses to see him. So when it was overcrowded he mounted his camel because the people were not beaten back to make way for the Prophet.” Muslim reported that to perform sa`i by walking is better, and riding, though permitted, is disliked. At-Tirmidhi reported that a group of knowledgeable people disliked that someone should perform tawaf of the Ka`bah and make sa`i between Safa and Marwah while riding on a mount without a valid excuse. This is the opinion of ash-Shafi`i.
Maliki scholars hold that a person who performs sa`i between Safa and Marwah while riding without having a valid excuse, must repeat it, if there is still time for him to do so. And if there is no time, then he must offer a sacrifice as a penalty, because it is wajib (requisite) if he is able to walk. Abu Hanifah holds a similar view. According to these scholars, the Prophet (peace and blessings be upon him) performed sa`i while riding because of the large number of people around him.