Some portions of the ancient castle de Petra now in ruins can be seen on the site where the "La Pietrina" Sanctuary is today, near the locality of Palagio, in the municipality of Montaione. On the summit of the small wooded hill, the stretches of walls in thin lines of rough cut pietra alberese delineate some of the castle spaces. From the statutes of the municipality of San Gimignano dating from the beginning of the 14th century, we learn that inside the Castle of Pietra, the construction of a house had been arranged for the castellan, sent on behalf of the municipality itself, to stay on site. The castle, however, must already have been provided with a boundary wall and a keep, probably the reduced fortification with towers whose traces remain on the highest part of the hill, together with the remains of a cistern for water storage. Inside the castle, a church was built dedicated to Saints Andrea and Agata. The castle church is mentioned for the first time in 1234, on the occasion of the appointment by the monks of the two Camaldolese foundations of Badia a Elmi and San Mariano, its area dependency, of the rector for the nearby castle of Montignoso. In fact, at the beginning of the 13th century, what was defined as a genuine "Camaldolese district" was in a nascent state in this sector of the Valdelsa, coordinated by the ancient monasteries of Adelmo (Badia a Elmi) and San Pietro a Cerreto, both built around in the middle of the 11th century on the left bank of the Elsa. From the point of view of the ecclesiastical organization of the territory, the "de Pietra" castle church was part of the parish church of Montignoso ("Ecclesia de Petra", year 1302-1303, Tuscia II, p. 209). The small community, which in the 15th century still depended on the castle parish, for the Florentine tax authorities, had no fewer than nine families, for a total of more than 50 individuals residing at the location. If Leonardo, at the beginning of the 16th century, represented the small town of "Pietra" with a wall circuit defended by towers, it is probable that, at that point in time, it still retained much of its early medieval defensive structure, and therefore the appearance of the small turreted castle appearing in Leonardo’s drawing.