The Prophet (ﷺ) said (on the day of Idal-Adha), "The first thing we will do on this day of ours, is to offer
the (`Id) prayer and then return to slaughter the sacrifice. Whoever does so, he acted according to our
Sunna (tradition), and whoever slaughtered (the sacrifice) before the prayer, what he offered was just
meat he presented to his family, and that will not be considered as Nusak (sacrifice)." (On hearing
that) Abu Burda bin Niyar got up, for he had slaughtered the sacrifice before the prayer, and said, "I
have got a six month old ram." The Prophet (ﷺ) said, 'Slaughter it (as a sacrifice) but it will not be
sufficient for any-one else (as a sacrifice after you). Al-Bara' added: The Prophet (ﷺ) said, "Whoever
slaughtered (the sacrifice) after the prayer, he slaughtered it at the right time and followed the tradition
of the Muslims."
Sahih al-Bukhari Book 73, Hadith 1