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.
quran:2:54

And ˹recall˺ when Moses said to his people, "O my people, indeed you have wronged yourselves by your taking of the calf ˹for worship˺. So repent to your Creator and kill yourselves. That is best for ˹all of˺ you in the sight of your Creator." Then He accepted your repentance; indeed, He is the Accepting of repentance, the Merciful.  

And when Moses said to his people, those who worshipped the calf, ‘My people, you have done wrong against yourselves by your taking the ˹golden˺ calf, for a god; now turn to your Creator, away from that worship ˹of the calf˺ and slay one another, that is, let the innocent of you slay the guilty; That, slaughter, will be better for you in your Creator’s sight’, who made it easier for you to accomplish this and sent down a dark cloud over you, so that none of you was able to see the other and show him mercy, such that almost seventy thousand of you were killed; and He will turn to you ˹relenting˺, before your ˹turning in˺ repentance; truly He is the Relenting, the Merciful.
القرآن:٢:٥٤

وَإِذْ قَالَ مُوسَىٰ لِقَوْمِهِ يَا قَوْمِ إِنَّكُمْ ظَلَمْتُمْ أَنْفُسَكُمْ بِاتِّخَاذِكُمُ الْعِجْلَ فَتُوبُوا إِلَىٰ بَارِئِكُمْ فَاقْتُلُوا أَنْفُسَكُمْ ذَٰلِكُمْ خَيْرٌ لَكُمْ عِنْدَ بَارِئِكُمْ فَتَابَ عَلَيْكُمْ ۚ إِنَّهُ هُوَ التَّوَّابُ الرَّحِيمُ  

{وإذ قال موسى لقومه} الذين عبدوا العجل {يا قوم إنكم ظلمتم أنفسكم باتخاذكم العجل} إلهاً {فتوبوا إلى بارئكم} خالقكم من عبادته {فاقتلوا أنفسكم} أي ليقتل البريءُ منكم المجرم {ذلكم} القتل {خير لكم عند بارئكم} فوفقكم لفعل ذلك وأرسل عليكم سحابة سوداء لئلا يبصر بعضكم بعضا فيرحمه حتى قتل منكم نحو سبعين ألفا {فتاب عليكم} قبل توبتكم {أنه هو التواب الرحيم}.