Sahih Muslim 1962 a
Anas (b. Malik) reported Allah's Messenger (ﷺ) having said on the day of Nahr (Sacrifice):
He who slaughtered (the animal as a sacrifice) before the ('Id) prayer. should repeat it (i. e. offer another animal). Thereupon a person stood up and said: Messenger of Allah, that is the day when meat is much desired, and he also made a mention of the need of his neighbour, and perhaps Allah's Messenger (ﷺ) attested it. He (the person who had sacrificed the animal before the 'Id prayer) said: I have a goat of less than one year of age with me and I like it more than two fleshy goats; should I offer it as a sacrifice? He permitted him to do so. He (the narrator) said: I do not know whether this permission was granted to anyone else besides him or not. Allah's Messenger (ﷺ) then turned towards two rams. and he slaughtered them, and the people' came to the goats and got them distributed amongst themselves (for offering them as sacrifice).
وَحَدَّثَنِي يَحْيَى بْنُ أَيُّوبَ، وَعَمْرٌو النَّاقِدُ، وَزُهَيْرُ بْنُ حَرْبٍ، جَمِيعًا عَنِ ابْنِ عُلَيَّةَ،
 - وَاللَّفْظُ لِعَمْرٍو - قَالَ حَدَّثَنَا إِسْمَاعِيلُ بْنُ إِبْرَاهِيمَ، عَنْ أَيُّوبَ، عَنْ مُحَمَّدٍ، عَنْ أَنَسٍ، قَالَ
 قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم يَوْمَ النَّحْرِ ‏
"‏ مَنْ كَانَ ذَبَحَ قَبْلَ الصَّلاَةِ فَلْيُعِدْ ‏"‏ ‏.‏
 فَقَامَ رَجُلٌ فَقَالَ يَا رَسُولَ اللَّهِ هَذَا يَوْمٌ يُشْتَهَى فِيهِ اللَّحْمُ ‏.‏ وَذَكَرَ هَنَةً مِنْ جِيرَانِهِ كَأَنَّ
 رَسُولَ اللَّهِ صلى الله عليه وسلم صَدَّقَهُ قَالَ وَعِنْدِي جَذَعَةٌ هِيَ أَحَبُّ إِلَىَّ مِنْ شَاتَىْ لَحْمٍ
 أَفَأَذْبَحُهَا قَالَ فَرَخَّصَ لَهُ فَقَالَ لاَ أَدْرِي أَبَلَغَتْ رُخْصَتُهُ مَنْ سِوَاهُ أَمْ لاَ قَالَ وَانْكَفَأَ رَسُولُ
 اللَّهِ صلى الله عليه وسلم إِلَى كَبْشَيْنِ فَذَبَحَهُمَا فَقَامَ النَّاسُ إِلَى غُنَيْمَةٍ فَتَوَزَّعُوهَا ‏.‏ أَوْ
 قَالَ فَتَجَزَّعُوهَا ‏.‏