When you enter the land the LORD your God is giving you, do not learn to imitate the detestable ways of the nations there.
Let no one be found among you who sacrifices his son or daughter in the fire, who practices divination or sorcery, interprets omens, engages in witchcraft,
or casts spells, or who is a medium or spiritist or who consults the dead.
Anyone who does these things is detestable to the LORD, and because of these detestable practices the LORD your God will drive out those nations before you.
Deuteronomy Chapter 18: Verses 9 - 12
I have not eaten any of the sacred portion while I was in mourning, nor have I removed any of it while I was unclean, nor have I offered any of it to the dead. I have obeyed the LORD my God; I have done everything you commanded me.
Deuteronomy Chapter 26: Verse 14
Saul then said to his attendants, "Find me a woman who is a medium, so I may go and inquire of her." "There is one in Endor," they said.
So Saul disguised himself, putting on other clothes, and at night he and two men went to the woman. "Consult a spirit for me," he said, "and bring up for me the one I name."
But the woman said to him, "Surely you know what Saul has done. He has cut off the mediums and spiritists from the land. Why have you set a trap for my life to bring about my death?"
Saul swore to her by the LORD, "As surely as the LORD lives, you will not be punished for this."
Then the woman asked, "Whom shall I bring up for you?" "Bring up Samuel," he said.
When the woman saw Samuel, she cried out at the top of her voice and said to Saul, "Why have you deceived me? You are Saul!"
The king said to her, "Don't be afraid. What do you see?" The woman said, "I see a spirit coming up out of the ground."
"What does he look like?" he asked. "An old man wearing a robe is coming up," she said. Then Saul knew it was Samuel, and he bowed down and prostrated himself with his face to the ground.
Samuel said to Saul, "Why have you disturbed me by bringing me up?" "I am in great distress," Saul said. "The Philistines are fighting against me, and God has turned away from me. He no longer answers me, either by prophets or by dreams. So I have called on you to tell me what to do."
Samuel said, "Why do you consult me, now that the LORD has turned away from you and become your enemy?
The LORD has done what he predicted through me. The LORD has torn the kingdom out of your hands and given it to one of your neighbors,to David.
Because you did not obey the LORD or carry out his fierce wrath against the Amalekites, the LORD has done this to you today.
The LORD will hand over both Israel and you to the Philistines, and tomorrow you and your sons will be with me. The LORD will also hand over the army of Israel to the Philistines."
1 Samuel Chapter 28: Verses 7 - 19