Leviticus 24:12-22

12 They kept him in custody until the LORD told them what to do.
13 The LORD spoke to Moses,
14 "The man who cursed [my name] must be taken outside the camp. All who heard him curse [my name] must lay their hands on his head. Then the whole congregation must stone him to death.
15 "Also tell the Israelites: Those who treat their God with contempt will be punished for their sin.
16 But those who curse the LORD's name must be put to death. The whole congregation must stone them to death. It makes no difference whether they are Israelites or foreigners. Whoever curses the LORD's name must die.
17 "Whoever kills another person must be put to death.
18 Whoever kills an animal must replace it, life for life.
19 Whoever injures a neighbor must receive the same injury in return--
20 a broken bone for a broken bone, an eye for an eye, a tooth for a tooth. Whoever injures another person must receive the same injury in return.
21 Whoever kills an animal must replace it. Whoever kills a person must be put to death.
22 The same rule applies to every one of you. It makes no difference whether you are a foreigner or an Israelite, because I am the LORD your God."