The shedding of blood defiled the land where the Lord dwelt. Therefore, the Lord made provision for the one who killed another by accident. The one who killed with premeditation was to be put to death. There was no mercy given.
But mercy was given to the one who killed by accident. God set aside six cities of refuge, three on each side of the Jordan River, where one who killed accidently could flee to and live, and be protected from the person who would seek to avenge the blood of the one killed - usually a close relative. That man had to stay in the city until the high priest of that city died. Then he would be free to return home. If he left the city before the priest died, he could legally be killed by the Avenger of Blood.