Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
bukhari:984Ḥāmid b. ʿUmar > Ḥammād b. Zayd > Ayyūb > Muḥammad > Anas b. Mālik

Messenger of Allah ﷺ offered the prayer on the day of Nahr and then delivered the Khutba and ordered that whoever had slaughtered his sacrifice before the prayer should repeat it, that is, should slaughter another sacrifice. Then a person from the Ansar stood up and said, "O Messenger of Allah ﷺ! because of my neighbors (he described them as being very needy or poor) I slaughtered before the prayer. I have a young she-goat which, in my opinion, is better than two sheep." The Prophet ﷺ gave him the permission for slaughtering it as a sacrifice.  

البخاري:٩٨٤حَدَّثَنَا حَامِدُ بْنُ عُمَرَ عَنْ حَمَّادِ بْنِ زَيْدٍ عَنْ أَيُّوبَ عَنْ مُحَمَّدٍ أَنَّ أَنَسَ بْنَ مَالِكٍ قَالَ

إِنَّ رَسُولَ اللَّهِ ﷺ صَلَّى يَوْمَ النَّحْرِ ثُمَّ خَطَبَ فَأَمَرَ مَنْ ذَبَحَ قَبْلَ الصَّلاَةِ أَنْ يُعِيدَ ذَبْحَهُ فَقَامَ رَجُلٌ مِنَ الأَنْصَارِ فَقَالَ يَا رَسُولَ اللَّهِ جِيرَانٌ لِي إِمَّا قَالَ بِهِمْ خَصَاصَةٌ وَإِمَّا قَالَ بِهِمْ فَقْرٌ وَإِنِّي ذَبَحْتُ قَبْلَ الصَّلاَةِ وَعِنْدِي عَنَاقٌ لِي أَحَبُّ إِلَىَّ مِنْ شَاتَىْ لَحْمٍ فَرَخَّصَ لَهُ فِيهَا