In an ongoing discussion of Israelite leadership, those who practiced magic and spiritualism were to be denounced and destroyed.
The author of Deuteronomy warns the people that the Canaanites performed abhorrent practices such as Child sacrifice is the ritualistic killing of children to please the gods. Such a practive hovers in the background of Abraham's (mercifully thwarted) sacrifice of Isaac. In the larger picture of Israel's history, child sacrifice was forbidden. More, consultation of familiar spirits, magic, sorcery, divination and necromancy. Deuteronomy insists that these practices work (and 1 The judge who anointed the first two kings of Israel More 28:7-20, Acts 16:16-19 agree), but that they should not be practiced by followers of the God of the Israelites. The Israelites were to have judges, officers, priests, kings, and prophets, but not magicians or spiritual technologists like the Canaanites whom they were displacing.