Дварим 17:5 Галаха: Mishneh Torah, Foreign Worship and Customs

וְהֽוֹצֵאתָ֣ אֶת־הָאִ֣ישׁ הַה֡וּא אוֹ֩ אֶת־הָאִשָּׁ֨ה הַהִ֜וא אֲשֶׁ֣ר עָ֠שׂוּ אֶת־הַדָּבָ֨ר הָרָ֤ע הַזֶּה֙ אֶל־שְׁעָרֶ֔יךָ אֶת־הָאִ֕ישׁ א֖וֹ אֶת־הָאִשָּׁ֑ה וּסְקַלְתָּ֥ם בָּאֲבָנִ֖ים וָמֵֽתוּ׃

тогда приведешь к воротам твоим того мужчину или ту женщину, которые совершили это зло, даже мужчину или женщину; и побей их камнями, чтобы они умерли.

Mishneh Torah, Foreign Worship and Customs of the Nations

A seduced city is not judged by any save by a tribunal of Seventy-One; for, it is said: "Then shalt thou bring forth that man or that woman, who have done this evil thing, unto thy gates" (Deut. 17.5.), herefrom we deduct that individual worshipers of idolatry are sentenced to death by the tribunal of each and every gate, but many are not sentenced to death by any save by the Great Tribunal.3Ibid. 17a-b.C.