According to legend, on July 17, 1490, in the midst of the infighting between local families of the Panciatichi and Cancellieri, some people saw blood dripping from the forehead of a 14th-century fresco of the Madonna painted on a small chapel, which was interpreted as a sign that the Virgin Mary suffered from the bloodshed in the region. The miracle was confirmed by Bishop Niccolò Pandolfini, and the important families of Pistoia decided to build the sanctuary to honor the Madonna. The fresco is attributed by some to Bartolomeo Cristiani, but was perhaps due to a local painter from Pistoia.
Originally the site had a small church or chapel, Santa Maria Forisportae, outside of the early medieval city walls of Pistoia. Initially plans to enlarge the church were commissioned from Giuliano da Sangallo, but when he left Tuscany, the design was completed by Ventura Vitoni, who began construction of the octagonal church in 1495, and work continued until his death in 1522. In 1563, the Grand Duke Cosimo I Medici entrusted completion to Giorgio Vasari, who elaborated the tall dome. The main altar was designed in 1579 by Pietro Tacca. The church was consecrated in 1582. The facade remains incomplete.
The 59-meter-high (194 ft) dome was completed in 1569, but its completion had been an arduous and prolonged task, and soon after, cracks appeared in the structure, requiring Vasari to add chains to gird the structure. But concerns about the stability emerged, and Bartolomeo Ammanati was called to create further reinforcement, concerned about the weight of the lantern, to the structure by Vasari. However, for centuries, problems continued, requiring further refurbishments well into the 21st century.
In 1931, Pope Pius XI elevated the church to the status of minor basilica.
The octagonal layout of the nave is more typical in devotional shrines, typically attended by individuals with a personal request, rather than the linear naves of churches belonging to the friars or Dominicans, where sermons to an audience were more important. The vertical red-tiled dome on the outside resembles a smaller version of Brunelleschi’s dome for the Cathedral of Florence].
An inventory in 1821 listed the church as containing the following works:
- Construction of the Temple by Giovanni Domenico Piastrini (Four canvases in atrium)
- Cain damned by God by Niccola Monti (atrium)
- Other canvases in atrium by Vincenzo Meucci and Gricci Fiorentino (Giuseppe Gricci?)
- Tomb of bishop Giuseppe Ippoliti sculpted by Francesco Carradori
- St Jacob canvas attributed to Gerino da Pistoia
- Rest in Egypt by Lazzaro Baldi (Alluminati altar)
- Adoration of the Magi by Francesco Vanni (Panciatichi altar)
- Adoration of the Shepherds by Pietro Sorri (Panciatichi altar)
- Assumption of the Virgin attributed to Francesco Morandini (il Poppi) (Rospigliosi altar)
- Frescoes in Rospigliosi altar attributed to Giovanni Battista Naldini
- Wreath with silver decorations above altar donated by Maddalena Morelli Fernandez, who as Corilla Olimpica was awarded this poet’s crown in Rome in 1778 by the Arcadian society
- Angels and Pelican sculpture above main altar by Pietro Tacca (donated by Sozzifanti family member).
- The bronze balustrade columns (1597) of the presbytery designed by Jacopo Lafri and Giovanni Battista Cennini
- Putti atop the balustrade by Leonardo Marcacci
- Virgin of the Annunciation and surrounding frescoes by Alessandro Fei (Rospigliosi altar)
- Birth of Jesus attributed to either Domenico Passignano or Pietro Sorri (Chiarenzi altar)
- Passion of Christ by Giovanni Domenico Ferreri
- San Zanobi by Giovanni Bilivert in the altar of the sacristy