1 Samuel 28:3-20
Now Samuel had died, and all Israel had mourned for him and buried him in Ramah, his own city. And Saul had put the mediums and the wizards out of the land. The Philistines assembled, and came and encamped at Shunem; and Saul gathered all Israel, and they encamped at Gilbo'a. When Saul saw the army of the Philistines, he was afraid, and his heart trembled greatly. And when Saul inquired of the LORD, the LORD did not answer him, either by dreams, or by Urim, or by prophets. Then Saul said to his servants, "Seek out for me a woman who is a medium, that I may go to her and inquire of her." And his servants said to him, "Behold, there is a medium at Endor."
So Saul disguised himself and put on other garments, and went, he and two men with him; and they came to the woman by night. And he said, "Divine for me by a spirit, and bring up for me whomever I shall name to you." The woman said to him, "Surely you know what Saul has done, how he has cut off the mediums and the wizards from the land. Why then are you laying a snare for my life to bring about my death?" But Saul swore to her by the LORD, "As the LORD lives, no punishment shall come upon you for this thing." Then the woman said, "Whom shall I bring up for you?" He said, "Bring up Samuel for me." When the woman saw Samuel, she cried out with a loud voice; and the woman said to Saul, "Why have you deceived me? You are Saul." The king said to her, "Have no fear; what do you see?" And the woman said to Saul, "I see a god coming up out of the earth." He said to her, "What is his appearance?" And she said, "An old man is coming up; and he is wrapped in a robe." And Saul knew that it was Samuel, and he bowed with his face to the ground, and did obeisance.
Then Samuel said to Saul, "Why have you disturbed me by bringing me up?" Saul answered, "I am in great distress; for the Philistines are warring against me, and God has turned away from me and answers me no more, either by prophets or by dreams; therefore I have summoned you to tell me what I shall do." And Samuel said, "Why then do you ask me, since the LORD has turned from you and become your enemy? The LORD has done to you as he spoke by me; for the LORD has torn the kingdom out of your hand, and given it to your neighbor, David. Because you did not obey the voice of the LORD, and did not carry out his fierce wrath against Am'alek, therefore the LORD has done this thing to you this day. Moreover the LORD will give Israel also with you into the hand of the Philistines; and tomorrow you and your sons shall be with me; the LORD will give the army of Israel also into the hand of the Philistines." Then Saul fell at once full length upon the ground, filled with fear because of the words of Samuel; and there was no strength in him, for he had eaten nothing all day and all night.