The punishment was that the righteous among Moses’ followers fight and kill the unrighteous; this is how it’s explained in some Tafsir books (interpretations by scholars of the Quran).