Joshua 20:3-6
20:3 Anyone who accidentally kills someone can escape there; these cities will be a place of asylum from the avenger of blood.
20:4 The one who committed manslaughter should escape to one of these cities, stand at the entrance of the city gate, and present his case to the leaders of that city. They should then bring him into the city, give him a place to stay, and let him live there.
20:5 When the avenger of blood comes after him, they must not hand over to him the one who committed manslaughter, for he accidentally killed his fellow man without premeditation.
20:6 He must remain in that city until his case is decided by the assembly and the high priest dies. Then the one who committed manslaughter may return home to the city from which he escaped.”
Joshua 20:9
20:9 These were the cities of refuge appointed for all the Israelites and for resident foreigners living among them. Anyone who accidentally killed someone could escape there and not be executed by the avenger of blood, at least until his case was reviewed by the assembly.