Deuteronomy 13:1-11 If a so-called prophet tells the children of Israel he had a vision to go after other gods, don’t listen to them. God is testing them. That prophet shall die to purge the evil from their midst. If any close friend or relative entices the children of Israel to go after other gods, don’t listen to them, but kill them by stoning them, so all Israel shall hear and fear and never again do any such wickedness.
Notes: God, in his sovereignty, allowed the false prophets to entice the people to apostasy to test the true disposition of the hearts of the Israelites. And while the temptation was dangerous, the overcoming of that temptation would strengthen the people in their love for God and obedience to his commandments. Love for family and friends must not take precedence over devotion to God.
Deuteronomy 13:12-18 If hear that your brethren in other cities have been enticed to go after other gods, you shall put all the inhabitants of that city to the sword including the cattle, gather the spoil, and burn the city with the spoil and a burn offering to the Lord. They city shall never be built again.
Notes: The first two scenarios above assume a lack of success in the attempts to lead Israelites astray. The third scenario is when certain worthless fellows have succeeded in drawing inhabitants of their city away from the Lord.