Castellar castle (cat. El Castell de Castellar) is a castle adapted as a masia (A masia is a type of rural construction) in the municipality of Aguilar de Segarra (Bages, Barcelona province, Catalonia, Spain) declared a cultural asset of national interest.
It is a large rectangular building on a rocky base, renovated in part in the 17th century and later adapted as a masia. It has a roughly oval floor plan. The ends of the long axis have an angular shape while those of the short axis are rounded. It has double walls, with small and medium stone ashlars slightly scattered, arranged in more or less regular rows. The space between the double wall was probably filled with rubble and lime mortar, which would give a great consistency to the structure. On the other hand, on the corners formed between the walls the stone blocks are well arranged. In general, the building has a rough appearance, with windows of small dimensions spread across all facades.
The castle was documented in 983 and 1029. The toponym “in Castelar” was given in 983, according to written records. In 1022 mentions were made to the “castro de Castellar”, granted by “Segui” to “Companis filio meo”. In 1063 the “termino de Castelar” (lat. the border of Castelar) was shared with the one of the Castle of Grevalosa or Gravalosa, as it appeared in the sale of the castle by Bernat Otger de Castellet (who then had it in fief) to the Count of Barcelona. In the hearth tax of 1358 it is said “Petrus de Gravalosa, Civis Minorise, pro XIIII focis quos habet in castro suo de Castellar”. The mentioned citizen of Manresa (lat. Minorise) also owned the place of Seguer, which continued in his and his family domain. In 1565 the lord of Castellar was “mossen janot de Gravalosa”. In 1707, king Carles (the pretending archduke) granted the county of Castellar to Francesc d’Amat-Grevalosa i de Planella, baron of Castellar (comtat of Sant Miquel de Castellar, since 1923).
In 2007, an archaeological intervention was carried out at the castle aimed at restoration, and three major constructive phases were established. The first phase corresponding to the 10th-13th centuries, the moment of the foundation of the castle. The remains of this phase are difficult to locate, due to the subsequent changes that the building has undergone, however, the perimeter walls are considered as the oldest structures documented, for now.
A second phase corresponds to the 13th-17th centuries, when reforms began in the castle. The last constructive phase is linked to the reform of the complex and its transformation into masia, in the 18th-19th centuries. The restoration of the castle was carried out between 2010-2011, and currently the castle is used for cultural activities.