The church dates back to the beginning of the 15th century with the first building erected in 1410 by the confraternity of St Mary of Mercy with an adjacent hospital ("ospitale").
The splendid portico, with six a arches supported by terracotta pillars and capitals in sandstone, was built between 1443 and 1473. Elegant, small, ogival windows look out from the upper facade. The inside of the church was designed by Giuseppe Tubertini from Budrio who worked on this project from 1783 to1792. During these years a new plan was given to the church, a central aisle covered by a barrel vaulted roof and two side chapels.
A semi circular collonade divides the presbytery from the ancient main chapel. There are a number of precious paintings; The crucifix and San Camillo de Lellis by Gaetano Gandolfi, the Madonna of Loreto by Giuseppe Ghedini and above all the imposing Coronation of the Virgin (1629) by Giacomo Lippi framed in a precious tabernacle sculptured with gold leaf floral decorations. At the beginning of the nave there are two very rare 18th century relief works depicting San Filippo Neri and St Emidio attributed to Domenico Palmerani. From the outside of the church you can see the tall, slim bell tower by the architect Vincenzo Torreggiani, erected between 1664 and 1668.
Recently the church and its interior have been restored and the magnificent organ (built by Domenico Maria Gentili from Medicina in 1790 and considered one of the best in the province) has now regained its original harmonious sound.