Samuel's last appearance happens after his death. Saul, facing the Philistine army and getting no answer by dream, by the sacred lots or by prophets, asks his servants to find a woman who consults the dead. He has himself expelled such practitioners from the land, and he goes in disguise.
The woman at Endor asks whom she should bring up. When Samuel appears she screams, because she has recognised her visitor. Samuel is described as an old man covered with a mantle, and he is irritated: why have you disturbed me. He then repeats the judgment he gave in life and adds that tomorrow Saul and his sons will be with him. Saul falls full length on the ground, and the woman, who has been told nothing about what happens to mediums under this king, insists that he eat before he goes back out.
The passage put later readers in difficulty, because the Torah prohibits consulting the dead absolutely, and here the consultation works. The narrator raises no doubt at all: it says Samuel, and gives him a speech. Ben Sira, writing in the second century BCE, refers to the prophet prophesying after his death without embarrassment. Later Jewish and Christian commentators were less comfortable and produced the alternatives that have circulated since: that the figure was a demonic counterfeit, that God overrode the ritual and sent the real Samuel, or that the whole thing was fraud.
The story is one of the very few places in the Hebrew Bible where a forbidden practice is shown being performed and shown succeeding, which is why it has never stopped being argued about.