Of ancient foundation, the church of Santa Maria in Via was built between 1491 and 1513, at the behest of Pope Innocent VIII (r. 1484-92). It was granted to the Order of the Servants of Mary by Pope Leo X (r. 1513-1521), and the Servites, as the Order is better known, still serve (no pun intended) the church.
The facade was designed by Giacomo della Porta (1532-1602), but completed by Carlo Rainaldi (1611-91) in 1681. The inscription proclaims: DEO · IN · HON · MARIAE · VIRGINIS · MATRIS · DEI · DD· A · MCCLVI (Dedicated to God in honour of Mary, the Virgin Mother of God, 1256).
The first chapel on the right celebrates the miracle of the Madonna del Pozzo (Madonna of the Well). The chapel is built over a well, which was once part of a stable-yard belonging to Cardinal Pietro Capocci. On the night of September 26th 1256, the well overflowed. The horses were disturbed and the servants rushed out to find an icon of the Virgin Mary, painted on a terracotta tablet, floating on the water. Pope Alexander IV (r. 1254-61) declared the event to be a miracle and ordered the construction of a chapel dedicated to the image. The well is still in operation and water from it continues to imbibed by the faithful.