Le Deutéronome 17:5 Halakha : Mishneh Torah, Foreign Worship and Customs

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

tu feras conduire aux portes de la ville cet homme ou cette femme, coupable d’un tel crime, l’homme ou la femme! Et tu les lapideras, pour qu’ils meurent sous les pierres.

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.