According to the simple reading of the passage in Sefer Devarim (21:22), someone who receives a death penalty will subsequently be hanged (and removed by nightfall). This reading of the Torah is rejected by both Rabbi Eliezer and the Ḥakhamim in the Mishna. Rabbi Eliezer restricts it to people who are condemned to death by stoning; the Ḥakhamim limit it further, only to people who are killed for blasphemy or idol worship. Another disagreement between the tanna’im relates to hanging women. While Rabbi Eliezer requires that women who are condemned to death be hanged, albeit with their faces to the pole, the Ḥakhamim rule that women are not hanged at all. Rabbi Eliezer responds by referring to the fact that Shimon ben Shetaḥ was know to have hanged women in Ashkelon. The Ḥakhamim answered him saying that Shimon ben Shataḥ’s ruling – condemning 80 women – was clearly extra-judicial, since a beit din cannot try more than one case every day.
The story in which Shimon ben Shataḥ hanged 80 women is Ashkelon appears in the Talmud Yerushalmi in Massekhet Ḥagiga. As related there, when Shimon ben Shataḥ was appointed as nasi he was told that there were 80 witches in a cave in Ashkelon. In order to trick them he came on a rainy day together with 80 young men who were each given a jar with a dry cloak in it. He told them that upon hearing his signal they should put on the dry cloak and come in to lift the witches off the ground, which would steal their powers from them. Shimon ben Shataḥ called for the witches to open the cave door so that he could enter. Upon doing so he impressed them, entering in a dry cloak, and told them that he came to learn and to teach. Each of the witches conjured up part of a festive meal and then inquired as to what magic he could do. He offered to make 80 young men appear in dry cloaks who would sweep them off their feet. Giving the signal, the men entered and captured the witches, who were taken off and hanged.
The story concludes that relatives of those witches who were angered by this came forward with false testimony accusing Shimon ben Shataḥ’s son of a capital crime. Upon being convicted and led to his death the witnesses recanted, but the son insisted that the punishment be carried out, since he feared that people would suspect that the Sages showed favoritism to him by allowing the witnesses to change their minds, something that would weaken the efforts that his father had made in strengthening these laws.