Is the Sa'y (ritual running between Safa and Marwah) valid if performed before the Tawaf (circumambulation)?
Chapter on Mentioning Hajj and Entering Makkah
Al-Mughni
Book of Hajj
Primary text
The Sa'y is dependent upon the preceding Tawaf; it is not valid unless a Tawaf has taken place before it. Performing the Sa'y first renders it invalid. This position is held by Malik, Al-Shafi'i, and the Ahl al-Ra'y (Hanafi school). The evidence for this is that the Prophet Muhammad (peace be upon him) performed his Sa'y only after his Tawaf, based on the command to 'Take your rites from me.' Consequently, if one performs Sa'y after Tawaf but later discovers that the Tawaf was performed without ritual purity (taharah), that Sa'y is not considered valid.
Supporting text
Ata holds that performing Sa'y before Tawaf suffices. A narration from Ahmad states it suffices if done out of forgetfulness (nisyan), but not if done intentionally, citing the Prophet's statement regarding prior performance or delay out of ignorance or forgetfulness: 'There is no harm.' If the pilgrim performs Sa'y after Tawaf and then realizes the Tawaf was impure, the subsequent Sa'y is invalidated.