I witnessed the Prophet ﷺ on the Day of Sacrifice, and he said, "Whoever slaughtered before performing the prayer must repeat the sacrifice with another animal in its place, and whoever has not yet slaughtered should now do so."
حدثنا آدم حدثنا شعبة حدثنا الأسود بن قيس سمعت
شهدت النبي ﷺ يوم النحر فقال من ذبح قبل أن يصلي فليعد مكانها أخرى ومن لم يذبح فليذبح