Some thoughts from the same book of "morals" that says "Thou shalt not kill":
Kill the Entire Town if One Person Worships Another God
Suppose you hear in one of the towns the LORD your God is giving you that some worthless rabble among you have led their fellow citizens astray by encouraging them to worship foreign gods. In such cases, you must examine the facts carefully. If you find it is true and can prove that such a detestable act has occurred among you, you must attack that town and completely destroy all its inhabitants, as well as all the livestock. Then you must pile all the plunder in the middle of the street and burn it. Put the entire town to the torch as a burnt offering to the LORD your God. That town must remain a ruin forever; it may never be rebuilt. Keep none of the plunder that has been set apart for destruction. Then the LORD will turn from his fierce anger and be merciful to you. He will have compassion on you and make you a great nation, just as he solemnly promised your ancestors. "The LORD your God will be merciful only if you obey him and keep all the commands I am giving you today, doing what is pleasing to him." (Deuteronomy 13:13-19 NLT)
Kill Followers of Other Religions.
1) If your own full brother, or your son or daughter, or your beloved wife, or you intimate friend, entices you secretly to serve other gods, whom you and your fathers have not known, gods of any other nations, near at hand or far away, from one end of the earth to the other: do not yield to him or listen to him, nor look with pity upon him, to spare or shield him, but kill him. Your hand shall be the first raised to slay him; the rest of the people shall join in with you. You shall stone him to death, because he sought to lead you astray from the Lord, your God, who brought you out of the land of Egypt, that place of slavery. And all Israel, hearing of this, shall fear and never do such evil as this in your midst. (Deuteronomy 13:7-12 NAB)
2) Suppose a man or woman among you, in one of your towns that the LORD your God is giving you, has done evil in the sight of the LORD your God and has violated the covenant by serving other gods or by worshiping the sun, the moon, or any of the forces of heaven, which I have strictly forbidden. When you hear about it, investigate the matter thoroughly. If it is true that this detestable thing has been done in Israel, then that man or woman must be taken to the gates of the town and stoned to death. (Deuteronomy 17:2-5 NLT)