The rites of the 10th of Zhul-Hijjah are performed in the following order:
These rites begin with throwing the pebbles, followed by offering the sacrifice, shaving one’s head, pertorming a tawaf around Ka’bah. Observance of these rites in this sequence is sunnah. If one of these is performed before or after another there is no harm, according to most scholars.
This is the standpoint of Ash-Shafi’i based on a hadith reported by Abdullah bin ‘Amr who said: “The Prophet (peace be upon him) stood in Mina during the Farewell Hajj, while the people asked him questions and he answered them. A man asked, ‘O Prophet of Allah! I was not alert and I shaved my head before slaughtering my animal?’ The Prophet (peace be upon him) said, ‘There is no harm, go and slaughter your animal.’ Another man asked, ‘I slaughtered the animal before I threw the pebbles?’ The Prophet (peace be upon him) told him, ‘There is no harm. Go and throw the pebbles.'” The narrator said: “Whoever asked the Prophet (peace be upon him) about anything done before or after the other he told him ‘No harm done. Go and do (whatever you missed).”‘
Abu Hanifah is of the opinion that if someone failed to observe the proper sequence in performing these rites, and he did delay or precede a rite, he must offer a sacrifice, interpreting the words “no harm done” of the Prophet (peace be upon him) to mean that such a person is not guilty of any sin, but nonetheless such a person has to slaughter an additional animal in atonement.