عَنْ أَنَسِ بْنِ مَالِكٍ رَضِىَ اللهُ عَنْهُ قَالَ قَالَ النَّبِيُّ صَلَّى اللهُ عَلَيْهِ وَسَلَّمَ
مَنْ ذَبَحَ قَبْلَ الصَّلاَةِ فَإِنَّمَا ذَبَحَ لِنَفْسِهِ، وَمَنْ ذَبَحَ بَعْدَ الصَّلاَةِ فَقَدْ تَمَّ نُسُكُهُ، وَأَصَابَ سُنَّةَ الْمُسْلِمِينَ
Hazrat Anas bin Malikra narrates that the Holy Prophetsa said, “Whoever slaughtered the sacrifice before the [Eid] prayer, he slaughtered it for himself, and whoever slaughtered it after the prayer, he slaughtered it at the right time and followed the tradition of the Muslims.”
(Sahih al-Bukhari, Kitab al-Adhahi, Hadith 5546)