Who was Saint Pelagia?
The Pope Joan legend may owe something to the Pelagia legends. Pelagia was a female Christian saint in the 4th or 5th century, but there are different versions.
Wikipedia focuses on the Pelagia who was an ascetic monk, who wasted away living on the Mount of Olives in Jerusalem. Upon her death, church leaders who had thought “Pelagius” was a man, were forced to recognize they had a scandal on their hands, so they claimed that clearly she was the famous “harlot” named Margarita. This was a rich and beautiful woman from Antioch (now the Turkish city of Antakya), who had given to flaunting herself in public with her friends, perfumed and barely dressed. The holy fathers insisted that she had repented of her evil ways and been baptized as Pelagia before moving to Jerusalem. Embarrassment averted.
The Devil (Satan) also puts in an appearance but he is driven away by Pelagia’s newfound Christian beliefs. The Orthodox Churches (Greek, Russian, Coptic, Syriac and Armenian) celebrate the story; the Catholic Church is more ambivalent. Catholic Online dismisses it as a “pious fiction.”
But there are other versions, grouped under “Pelagia of Tarsus” (Tarsus being just around the coast from Antioch). For example, late in the 3rd century, when the ruler of Antioch heard that the 15-year-old Pelagia was a Christian, he sent some young men to rape her, but she jumped out a high window to keep her virginity as a bride of Christ and she was killed. A century later, Saint John Chrysostom would argue that she was attempting to escape, not committing suicide, thus a virgin martyr. In another version, Emperor Diocletian’s son was responsible for all this, but he committed suicide when she refused him. It happens. When Pelagia turned up in Rome - why, we do not know - Diocletian himself gave it a go and she called him insane, so he had her burned to death, inside a brazen bull (photo above), a metal torture device.
Maybe the first Pelagia was named after this one.
But that's not all. There is also the legend of Marina the Monk (shown above), which may have been derived from the Pelagia story. She too was thought to be from Antioch and she too lived much of her life as a man, but she was accused of fathering a child and banished from the monastery (it's a long story, but one of the better ones). Lots of cross-dressing and trans histories in these legends.
Saint Marina is often conflated with Saint Margaret of Antioch, since Marina is the Orthodox name for Margaret, but Margaret did none of these things (apparently) and is more famous for being swallowed and spat out by Satan in the form of a dragon and for inspiring Joan of Arc.
There are other Saint Marinas, mostly from Italy and Spain. Marina of Aguas Santas (shown above) is from a town in Galicia. A Christian, she refused to marry a Roman prefect and was beheaded. Water flowed from where her head touched the ground, hence the name of the town ("holy waters") and there are churches in her honor throughout Spain. As with the legends above, there are multiple variants on this one too.
But, we can go back even further. Was Saint Thecla of Iconium the inspiration for all these women? Thecla was associated with Saint Paul and there is some question as to whether she actually was martyred. She fights off various rape attempts and survives several attempts to execute her; it's a series of miracles. Later she dressed as a monk and this may have inspired imitators - Eugenia of Rome, Anastasia the Patrician and many others, including those in this article, and today there are churches in her name across the world. (The source for Thecla is Acts of Paul and Thecla, a New Testament apocryphal text, and Iconium is now Konya, Türkiye.) She is said to be buried at the Convent of Saint Thecla (Mar Takla) in Ma'aloula, Syria (shown above).