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

כִּֽי־יִמָּצֵ֤א בְקִרְבְּךָ֙ בְּאַחַ֣ד שְׁעָרֶ֔יךָ אֲשֶׁר־יְהוָ֥ה אֱלֹהֶ֖יךָ נֹתֵ֣ן לָ֑ךְ אִ֣ישׁ אוֹ־אִשָּׁ֗ה אֲשֶׁ֨ר יַעֲשֶׂ֧ה אֶת־הָרַ֛ע בְּעֵינֵ֥י יְהוָֽה־אֱלֹהֶ֖יךָ לַעֲבֹ֥ר בְּרִיתֽוֹ׃

Если среди тебя и в воротах твоих, которых Господь, Бог твой, дает тебе, мужчина или женщина, найдет ты, делающий зло в очах Господа, Бога твоего, нарушает завет Свой,

Mishneh Torah, Foreign Worship and Customs of the Nations

None of the cities of escape is adjudged a seduced city, as it is said: "Within any of thy gates" (Deut. 17.2); nor is Jerusalem adjudged a seduced city as it was not divided among the tribes. A buffer city must not be adjudged a seduced city, lest the idolaters enter through it and destroy Eretz Ysrael. A single tribunal should not adjudge three cities, one alongside the other, seduced cities, but if they be far apart it may be done.6Sifre, Deut. 17; Sanhedrin, 2a; Ibid. 16a-b; Baba Kamma, 72a C.G.