Sahih Muslim Book 22, Hadith Number 4818.

Chapter : The proper time for sacrifice.

Jundab b. Sufyan reported: I was with Allah’s Messenger (may peace be upon him) on the day of ‘Id al-Adha. While he had not returned after having offered (the Id prayer) and finished it, he saw the flesh of the sacrificial animals which had been slaughtered before he had completed the prayer. Thereupon he (the Holy Prophet) said: One who slaughtered his sacrificial animal before his prayer or our prayer (‘Id), he should slaughter another one in its stead, and he who did not slaughter, he should slaughter by reciting the name of Allah.