People studying the provenance of various legends and myths usually trace back the idea of the sword in the stone (in Arthurian legend) to the hagiography of St. Galgano Guidotti, whose feast is today. St. Galgano was a twelfth-century saint. He was a knight, and said to be rather arrogant and ruthless, but one day his horse refused to be guided and ran up to the hill of Montesiepe, where he had a vision of the Archangel Michael. In response, he drove his sword into a rock, which, it is said, it went through as if it were butter, and fused with the stone. There he started a hermitage, the Rotonda at Montesiepe (which was later given to the Cistercians), and there you can see the sword even today.
Galgano lived during the period when the first formalized canonization process was being put into place, and thus, when he was canonized a few years after his death, he was one of the first to go through that process. For that reason we know more about his actual life than we probably would have otherwise known. (The earlier default process, by long local veneration, has many advantages, but, unlike the formal process often lets historical traces fade into the mists of legend.) When in the nineteenth century it became fashionable to be preemptively skeptical of legends like St. Galgano's -- i.e., not merely recognizing them as stories with accumulation and occasionally transformation, misunderstanding, and assimilation to other stories, but treating them as active fictions made up whole cloth unless it can be shown otherwise -- the sword was often assumed to be a modern forgery; but the sword is indeed medieval, and the basic story goes back almost to the life of St. Galgano himself. Were the sword to have vanished, people would doubtless now regard it as pure fiction; but, whatever one's explanation of how it got there, there actually is a sword in the stone.