Mention of the Matamargó site dates back to 1086, the year in which the Viscount of Cardona left the castle of “Matamargon”, among others, to his wife and brother.
The first church of Sant Pere (Saint Peter) would also have been the church of the castle and the parish church of the site. In the 17th century, it was enlarged and completely renovated, which also affected the castle area. The original church was replaced by the current one in the mid-17th century (Rector Gaspar Brufau commissioned the works in 1650) and, at its inauguration, the Lord of the Manor Josep Lluc brought the relics of Saint Christopher, Saint Catherine and Saint Anthony of Padua there from the chapel of La Mare de Déu dels Àngels of the farmhouse of Les Cases. The altar of the Rosary was commissioned to Segimon Pujol, a sculptor from Folgueroles, and his son Francesc Pujol. The magnificent altarpiece of the high altar was completed in 1796.
It is a single-nave church with side chapels, a rectangular chancel to the east and a west-facing façade. To the north-west stands the church bell tower with its square floor plan, topped by a balustrade. The door follows a model that was very common for the era: crowned by a sunken semi-circular arch pediment with the symbol of Saint Peter and the following inscription: “Tu est Petrus et super hanc petram edificabo ecclesiam meam Mattm. 1618”