This castle dates back to at least the mid-11th century. The castle was built for defence purposes, offering a commanding view of the Capellades gorge, a strategic point along the royal way.
The original complex initially included an upper and lower enclosure, both of which were walled. An 80-metre section of the west wall and a 35-metre section of the north wall remain standing today, containing several loopholes. The church of Sant Salvador, of Romanesque origin, also survives. In the 17th century a large new residence for the owners was built over part of the castle.
The castle was initially possessed by the viscounts of Barcelona but ownership was later transferred to the counts of Barcelona. It remained under their control until the 13th century when King James I gave it to Asbert de Mediona in exchange for Altea Castle. After the Mediona family, the castle was owned successively by the Tous, Cardona, Camporrells and Foixà families, the last of which held the rights until the 19th century. However, the Móra family had effective possession of the castle from the 17th century.
This large house embodies the adaptation of the castle to a new scenario in which it retained its role as the most important building in the district but in which defensive tasks were no longer a priority.