Bonastre is a municipality in the comarca of the Baix Penedès in Catalonia, Spain. It is situated in the west of the comarca in the Quadrell range.
In 1178, Bernat de Papiol, who was lord of the place, donated it to the Monastery of St Cugat. In 1382, King Pedro IV took possession of Bonastre for the crown although the monastery continued to govern the village until the 17th Century.
During the Trienio Liberal Bonastre supported the royalists. In 1822 the town was attacked by a party of militia and was left deserted as its inhabitants fled to the surrounding mountains. However the militia were attacked by royalist troops when they left Bonastre and routed.
The 19th-century parish church is dedicated to St Magdalene. It was built on the site of an ancient Romanesque temple which was completely destroyed on 1849. It consists of a single building covered by a cylindrical vault, with small interconnecting chapels at the side. The baptistry and sanctuary stand out. It was the work of a modernistic architect Josep Maria Jujol. Another notable building is a 19th-century house known as “can Fontanilles”. It has some interesting graphics on its façade, which include the arms of Bonastre and Catalonia