Legend has it that a nobleman from Aragón, Juan de Atarés, spent his days in this cave, praying and surviving on what nature provided.
One day, he heard footsteps outside the cave. Upon stepping out, he saw a knight dressed in splendid attire. Surprised, the knight asked him why a man of nobility was living poorly, dressed in rags, and residing in a cave. Suddenly, with a loud rumble, the rocks of the cave began to shift, forming columns, arches, and vaults, transforming the cave into a magnificent palace.
Realizing that the figure before him was none other than the devil himself, Juan de Atarés stepped back as the figure spoke:
“Behold what I am capable of. If you follow me, you will live in luxury, and all you desire will be yours.”
Terrified, the poor hermit fell to his knees and began to pray fervently until he collapsed and lost consciousness. When he awoke, he found himself in the presence of an angelic being who said to him:
“Do you see what remains of the manifestation of evil? Descend into the valley and go to Monte Pano. There, you will find a cave where you must build an altar in honor of Saint John the Baptist, to whom you will entrust your soul.”
Following this divine guidance, Juan de Atarés built a small altar and spent the rest of his days there until his passing. Days before he died, he carved an inscription that read:
“I, Juan, the first hermit of this place, built this church as far as my strength allowed in honor of Saint John the Baptist, and here I rest.”
Years later, one autumn morning in the 8th century, two noble brothers named Félix and Voto were hunting on Monte Oroel when one of the brothers fell into a ravine with his horse.
Believing his life was about to end, he prayed to Saint John the Baptist.
At that very moment, the horse steadied itself on a rock, averting the fatal accident.
Voto, realizing he had been saved by a miracle, knelt and began to pray. To his astonishment, he discovered a small church within a cave, where the remains of Juan de Atarés rested.
After this event, Voto recounted what had happened to his brother, and they returned home. Over time, the two brothers decided to sell all their possessions and return to the small cave-church on Monte Pano, where they spent the rest of their lives devoted to prayer and living as hermits.
Thus began the story of the Monastery of San Juan de la Peña.
