Cities of Pikuach Nefesh
(א) שלוש ערים תבדיל אחר שבאר ענין השופטים והמלך והכהנים והנביאים ספר המצות המוטלות על השופטים והם הבדלת ערי מקלט וגבולות הארץ וחקירת העדים וקבלתם והמצות המוטלות על המלכים והם כי תצא למלחמה כי תקרב אל עיר וכי תצור. והמוטל על הכהנים והשופטים יחדיו והם עניני עגלה ערופה:

(1) שלוש ערים תבדיל, after Moses had explained the function of the judges, the king, the priests, and the prophets, Moses now details some of the tasks that fall under the jurisdiction of the judges, among them the establishment of the cities of refuge, the boundaries of the land, the examination of witnesses to establish that their testimony is truthful and accurate, and that they are acceptable as witnesses. Next, he deals with the tasks that fall within the competence of the king, such as leading the nation in war, especially aggressive wars beyond the boundaries of the land of Israel. (20, 1-9) The priests also have a role to play during the preparation of what are termed מלחמת רשות, “halachically permissible wars,” although they are not fought in order to repel invaders. The priests and judges cooperate in some of their duties, especially the עגלה הערופה, the calf killed when a murder in the field was unresolved. (21,1-9)

(א) כִּֽי־יַכְרִ֞ית יְהוָ֤ה אֱלֹהֶ֙יךָ֙ אֶת־הַגּוֹיִ֔ם אֲשֶׁר֙ יְהוָ֣ה אֱלֹהֶ֔יךָ נֹתֵ֥ן לְךָ֖ אֶת־אַרְצָ֑ם וִֽירִשְׁתָּ֕ם וְיָשַׁבְתָּ֥ בְעָרֵיהֶ֖ם וּבְבָתֵּיהֶֽם׃ (ב) שָׁל֥וֹשׁ עָרִ֖ים תַּבְדִּ֣יל לָ֑ךְ בְּת֣וֹךְ אַרְצְךָ֔ אֲשֶׁר֙ יְהוָ֣ה אֱלֹהֶ֔יךָ נֹתֵ֥ן לְךָ֖ לְרִשְׁתָּֽהּ׃ (ג) תָּכִ֣ין לְךָ֮ הַדֶּרֶךְ֒ וְשִׁלַּשְׁתָּ֙ אֶת־גְּב֣וּל אַרְצְךָ֔ אֲשֶׁ֥ר יַנְחִֽילְךָ֖ יְהוָ֣ה אֱלֹהֶ֑יךָ וְהָיָ֕ה לָנ֥וּס שָׁ֖מָּה כָּל־רֹצֵֽחַ׃ (ד) וְזֶה֙ דְּבַ֣ר הָרֹצֵ֔חַ אֲשֶׁר־יָנ֥וּס שָׁ֖מָּה וָחָ֑י אֲשֶׁ֨ר יַכֶּ֤ה אֶת־רֵעֵ֙הוּ֙ בִּבְלִי־דַ֔עַת וְה֛וּא לֹא־שֹׂנֵ֥א ל֖וֹ מִתְּמֹ֥ל שִׁלְשֹֽׁם׃ (ה) וַאֲשֶׁר֩ יָבֹ֨א אֶת־רֵעֵ֥הוּ בַיַּעַר֮ לַחְטֹ֣ב עֵצִים֒ וְנִדְּחָ֨ה יָד֤וֹ בַגַּרְזֶן֙ לִכְרֹ֣ת הָעֵ֔ץ וְנָשַׁ֤ל הַבַּרְזֶל֙ מִן־הָעֵ֔ץ וּמָצָ֥א אֶת־רֵעֵ֖הוּ וָמֵ֑ת ה֗וּא יָנ֛וּס אֶל־אַחַ֥ת הֶעָרִים־הָאֵ֖לֶּה וָחָֽי׃ (ו) פֶּן־יִרְדֹּף֩ גֹּאֵ֨ל הַדָּ֜ם אַחֲרֵ֣י הָרֹצֵ֗חַ כִּי־יֵחַם֮ לְבָבוֹ֒ וְהִשִּׂיג֛וֹ כִּֽי־יִרְבֶּ֥ה הַדֶּ֖רֶךְ וְהִכָּ֣הוּ נָ֑פֶשׁ וְלוֹ֙ אֵ֣ין מִשְׁפַּט־מָ֔וֶת כִּ֠י לֹ֣א שֹׂנֵ֥א ה֛וּא ל֖וֹ מִתְּמ֥וֹל שִׁלְשֽׁוֹם׃ (ז) עַל־כֵּ֛ן אָנֹכִ֥י מְצַוְּךָ֖ לֵאמֹ֑ר שָׁלֹ֥שׁ עָרִ֖ים תַּבְדִּ֥יל לָֽךְ׃ (ס) (ח) וְאִם־יַרְחִ֞יב יְהוָ֤ה אֱלֹהֶ֙יךָ֙ אֶת־גְּבֻ֣לְךָ֔ כַּאֲשֶׁ֥ר נִשְׁבַּ֖ע לַאֲבֹתֶ֑יךָ וְנָ֤תַן לְךָ֙ אֶת־כָּל־הָאָ֔רֶץ אֲשֶׁ֥ר דִּבֶּ֖ר לָתֵ֥ת לַאֲבֹתֶֽיךָ׃ (ט) כִּֽי־תִשְׁמֹר֩ אֶת־כָּל־הַמִּצְוָ֨ה הַזֹּ֜את לַעֲשֹׂתָ֗הּ אֲשֶׁ֨ר אָנֹכִ֣י מְצַוְּךָ֮ הַיּוֹם֒ לְאַהֲבָ֞ה אֶת־יְהוָ֧ה אֱלֹהֶ֛יךָ וְלָלֶ֥כֶת בִּדְרָכָ֖יו כָּל־הַיָּמִ֑ים וְיָסַפְתָּ֨ לְךָ֥ עוֹד֙ שָׁלֹ֣שׁ עָרִ֔ים עַ֖ל הַשָּׁלֹ֥שׁ הָאֵֽלֶּה׃ (י) וְלֹ֤א יִשָּׁפֵךְ֙ דָּ֣ם נָקִ֔י בְּקֶ֣רֶב אַרְצְךָ֔ אֲשֶׁר֙ יְהוָ֣ה אֱלֹהֶ֔יךָ נֹתֵ֥ן לְךָ֖ נַחֲלָ֑ה וְהָיָ֥ה עָלֶ֖יךָ דָּמִֽים׃ (ס)

(1) When Adonai your God has cut down the nations whose land Adonai your God is assigning to you, and you have dispossessed them and settled in their towns and homes, (2) you shall set aside three cities in the land that Adonai your God is giving you to possess. (3) You shall prepare the road, and divide into three parts the territory of the country that Adonai your God has allotted to you, so that any manslayer may have a place to flee to.— (4) Now this is the case of the manslayer who may flee there and live: one who has killed another unwittingly, without having been his enemy in the past. (5) For instance, a man goes with his neighbor into a grove to cut wood; as his hand swings the ax to cut down a tree, the ax-head flies off the handle and strikes the other so that he dies. That man shall flee to one of these cities and live.— (6) Otherwise, when the distance is great, the blood-avenger, pursuing the manslayer in hot anger, may overtake him and kill him; yet he did not incur the death penalty, since he had never been the other’s enemy. (7) That is why I command you: set aside three cities. (8) And when Adonai your God enlarges your territory, as God swore to your fathers, and gives you all the land that Adonai promised to give your fathers— (9) if you faithfully observe all this Instruction that I enjoin upon you this day, to love Adonai your God and to walk in God's ways at all times—then you shall add three more towns to those three. (10) Thus blood of the innocent will not be shed, bringing bloodguilt upon you in the land that Adonai your God is allotting to you.

What is the purpose of the cities of refuge?

(א) תכין לך הדרך. "מִקְלָט", "מִקְלָט" הָיָה כָתוּב עַל פָּרָשַׁת דְּרָכִים (מכות י'):

(1) תכין לך הדרך THOU SHALT PREPARE THEE A WAY — “Refuge!” "Refuge!" was inscribed at each crossroad (to point the way to the nearest city of refuge) (Makkot 10b).

(א) פן ירדף גאל הדם. לְכָךְ אֲנִי אוֹמֵר לְהָכִין לְךָ דֶּרֶךְ וְעָרֵי מִקְלָט רַבִּים:
(1) פן ירדף גאל הדם LEST THE AVENGER OF THE BLOOD PURSUE [THE SLAYER] — therefore I tell you to prepare the way for you and [to prepare] many cities of refuge.
(א) ויספת לך עוד שלש. הֲרֵי תֵשַׁע, שָׁלוֹשׁ שֶׁבְּעֵבֶר הַיַּרְדֵּן וְשָׁלוֹשׁ שֶׁבְּאֶרֶץ כְּנַעַן וְשָׁלוֹשׁ לֶעָתִיד לָבֹא (ספרי):
(1) ויספת לך עוד שלש THEN THOU SHALT ADD THREE [CITIES] MORE FOR THEE — Thus you have nine altogether: the three on the east side of the Jordan, the three in the land of Canaan and three more in the future to come when God will enlarge thy territory (Sifrei Devarim 185:1).

(ו) תכין לך הדרך ושלשת את גבול ארצך (דברים יט, ג). הכלל, השם יתברך לית מחשבה תפיסה כו', רק שצמצם עצמו במדת אברהם לעשות חסד וכן במדת יצחק לירא מפניו וכן במדת יעקב לרחם ועל ידי זה כביכול נעשה גבול ובזה הארץ שלך. וזהו תכין לך הדרך, בזה תכין לך הדרך להשיג ה' על ידי מדותיו ועל ידי זה ושלשת את גבול, וגם על ידי זה הוא ארצך:

(6) Deuteronomy 19,3. “You shall prepare the way for ‎yourself by dividing your territory into three sections;” ‎‎
We know that it is impossible for the human brain to ‎understand the essence of G’d. Since G’d is ever concerned with ‎facilitating the Israelites’ coming closer, God had ‎progressively imposed restrictions on Godself through the three ‎principal attributes that distinguished the patriarchs Avraham, ‎Yitzchok and Yaakov, i.e. the attribute ‎חסד‎, loving kindness,” ‎יראה‎ “manifestation of reverence and awe, and Yaakov’s attribute ‎of practicing mercy. Moses refers to this division of G’d’s ‎attributes into three distinct parts which when used properly ‎enable the Jewish people to get a firm hold on their homeland, so ‎that it may be described as ‎ארצך‎, “your land.” This will prove to ‎be the route by means of which you will attain your objective, i.e. ‎דבקות ה'‏‎, “close attachment to Hashem.”‎

(כ) צֶ֥דֶק צֶ֖דֶק תִּרְדֹּ֑ף לְמַ֤עַן תִּֽחְיֶה֙ וְיָרַשְׁתָּ֣ אֶת־הָאָ֔רֶץ אֲשֶׁר־יְהוָ֥ה אֱלֹהֶ֖יךָ נֹתֵ֥ן לָֽךְ׃ (ס)

(20) Justice, justice shall you pursue, that you may thrive and occupy the land that the LORD your God is giving you.

(ד) אֶחָד הַגַּג וְאֶחָד כָּל דָּבָר שֶׁיֵּשׁ בּוֹ סַכָּנָה וְרָאוּי שֶׁיִּכָּשֵׁל בָּהּ אָדָם וְיָמוּת. כְּגוֹן שֶׁהָיְתָה לוֹ בְּאֵר אוֹ בּוֹר בַּחֲצֵרוֹ בֵּין שֶׁיֵּשׁ בּוֹ מַיִם בֵּין שֶׁאֵין בּוֹ מַיִם חַיָּב לַעֲשׂוֹת חֻלְיָא גְּבוֹהָה עֲשָׂרָה טְפָחִים. אוֹ לַעֲשׂוֹת לָהּ כִּסּוּי כְּדֵי שֶׁלֹּא יִפּל בָּהּ אָדָם וְיָמוּת. וְכֵן כָּל מִכְשׁל שֶׁיֵּשׁ בּוֹ סַכָּנַת נְפָשׁוֹת מִצְוַת עֲשֵׂה לַהֲסִירוֹ וּלְהִשָּׁמֵר מִמֶּנּוּ וּלְהִזָּהֵר בַּדָּבָר יָפֶה יָפֶה. שֶׁנֶּאֱמַר (דברים ד ט) "הִשָּׁמֶר לְךָ וּשְׁמֹר נַפְשְׁךָ". וְאִם לֹא הֵסִיר וְהֵנִיחַ הַמִּכְשׁוֹלוֹת הַמְּבִיאִין לִידֵי סַכָּנָה בִּטֵּל מִצְוַת עֲשֵׂה וְעָבַר בְּ(דברים כב ח) "לֹא תָשִׂים דָּמִים":

The roof is like every other thing that has danger in itself, and which is possible that a person will make a mistake with it and die. An example is having a pit in one's property, whether it has water or not - one is obligated to make a wall of ten tefachim (80cm./32 in.) around it, or a covering over it, so a person won't fall in it and die. And so too any stumbling block in which there is a danger to life: it is a positive mitzvah to remove it, and to guard against it, and to be exceedingly cautious about it, as it is written "take care of yourself and guard your life" (Deut. 4:9). And if one has not removed the stumbling blocks that bring people to danger, one has canceled a positive commandment and transgressed "do not bring bloodguilt" (Deut. 22:8).