Leviticus 24:16
And he that blasphemeth the name of the LORD, he shall surely be put to death, and all the congregation shall certainly stone him: as well the stranger, as he that is born in the land, when he blasphemeth the name of the LORD, shall be put to death.
Blaspheming the name of the Lord is a grave sin punishable by death by stoning, carried out by and before the whole congregation, with the whole congregation taking part in the execution. The law applies equally to the stranger and to the one born in the land, with no distinction between them. The law was prompted by a specific case in which, after a man blasphemed in anger, God Himself directed the sentence to be carried out.
Words spoken in malice against God must not be treated as a minor offense, and the severity of the penalty shows how seriously they are to be regarded. Willful Sabbath-breaking received the same death penalty as blasphemy, because both offenses expressed contempt for God's authority. Punishing the offense warned the people to hold God's name in reverence, since allowing it to go unpunished would corrupt others and lead to greater harm.
The death penalty attached to these offenses does not make the commandments they violated inapplicable. Although God may not now punish sin with temporal penalties, death remains the final portion of those who violate His law.