Constructed in a few years, between 1587 and 1612, the current church of Esparreguera substitutes the previous parochial temple, which had become too small. It was quite damaged by the french occupation, when the Napoleonic troops used it as headquarters. But what caused it irrecuperable damages was the Spanish Civil War, when a squad from out of the village was responsible for the destruction, among others, of the fabulous main altarpiece by Jaume Comes and Nicolau Travé from 1777, of the altarpiece of Sant Miquel (Saint Michael), by Pau Boxadell and Antoni Rovira, of the organ made in 1625 by Francesc Bordons, as well as the furniture and the parochial archive.
Even though it was blessed in 1612 by the Father Abbot of Montserrat, the bell-tower was not finished until 1636. Started with a square plant, which becomes octagonal in the higher parts, its height of 60 metres is a real lookout over Baix Llobregat.