Castle of Gallifa: A Medieval Fortress and Romanesque Sanctuary in Spain
Site at a Glance
- Rating
- 4.4
- Popularity
- Very Low
- Country
- Spain
- Primary era
- Medieval
- Eras represented
- Iron Age, Medieval
- Civilizations
- Iberian
- Site type
- Military
- Remains
- Castle
On this page7 sections
History
Castle of Gallifa is a small medieval fortification in Gallifa, Spain, built in the tenth century and historically used as the jurisdictional centre of the surrounding territory. It originally belonged to the counts of Barcelona, the medieval ruling dynasty whose lands formed the political core of Catalonia, and was administered by the Gallifa family, which took its name from the castle. Excavations have also revealed Iberian walls dating to the eighth century BC, showing that the territory was stably occupied before the medieval fortress was built.
Early occupation and medieval lordship
The castle first appears in written documentation in 999. The Gallifa lineage is recorded from 1060, when Ramon, son of Adaltrudis and husband of Rodlendis, held the family connection to the fortress. Their son, Bernat Ramon de Gallifa, succeeded him and also served as castellan of Clarà Castle at Moià. A castellan was the officer responsible for administering and defending a castle on behalf of its lord.
After Bernat Ramon died around 1115, the castle passed jointly to Ramon Bernat, also known as Ramon of Maçanet, and his sister Rodlendis, the wife of Guillem Humbert de Rocafort. This created shared lordship, or a condominium, between the Gallifa-Maçanet and Rocafort families. The eldest Gallifa heir later transferred the castle to Ramon Berenguer IV while retaining his position as castellan. In 1160, the fortress was sold or granted as a fief to the Rocafort family. In medieval feudal practice, to infeudate a castle meant to transfer it in return for obligations of service or loyalty.
Later jurisdiction and changing use
In 1348, Bernardo de Guasius de Petra was lord of the castle. King Peter III transferred full jurisdiction over the castles of Gallifa, Montmany, and el Figueró to Ramon de Centelles in 1357. Centelles authority at Gallifa continued during the period that ended in 1564. Around this time, the people of Gallifa are also recorded as having paid 10,000 sous to King Philip II of Spain to obtain freedom from taxation.
The fortress lost its military role during the sixteenth century and became the centre of the parish of Santa Maria del Castell. The church operated as a subsidiary of the parish of Sant Pere and Sant Feliu, serving part of the territory alongside the church of Gallifa. It continued in this parish role until 1860. A reorganization in 1868 placed it under Sant Sebastià de Sant Sebastià de Montmajor.
Restoration and religious transformation
Restoration or reconstruction work on the church took place in 1670. By 1924, the building threatened to collapse, so the image of the Virgin was taken down to Gallifa and much of the roofing material was reused to repair the parish church of Sant Pere and Sant Feliu. The nineteenth-century image was damaged during the Spanish Civil War of 1936 to 1939.
In 1985, the rector of Gallifa, Josep Dalmau, began reconstructing the Romanesque hermitage. Romanesque architecture is a medieval European style characterized by heavy masonry, round arches, sturdy proportions, and vaulted construction. The church was consolidated, restored, and returned to worship under the dedication of the Mother of God of Ecology, a Christian dedication associating the Virgin Mary with ecological values. The site then became a meeting place for the promotion of ecological values from a Christian perspective and became associated with the Diocese of Terrassa.
Castle of Gallifa was declared a cultural asset of national interest and classified as a historic monument on 8 November 1988. In 1986, the ecological sanctuary received a three-branched pine sapling descended from the Pi de les Tres Branques, the culturally symbolic Pine of the Three Branches associated with Catalan identity.
Remains
Fortified summit
The castle occupies a steep hill or plateau at approximately 600 metres above sea level. Its fortified enclosure was bounded by walls and had portals on the west and east sides, each linked to a lookout tower. Most of the complex is ruined, but sections of the walls around the summit, one portal, the chapel, and traces of other buildings survive.
A quadrangular tower stands at the western end of the enclosure. Two vaulted storeys remain, while a third storey has collapsed. Structures at the western angle of the church may represent another section of the wall enclosing the upper part of the complex. Residential structures adjoin the walls toward the north-eastern angle of the plateau, preserving part of the relationship between the fortified boundary and the castle’s domestic buildings.
Santa Maria del Castell
The former castle chapel, Santa Maria del Castell, is a Romanesque church built within the fortification among the former castle dependencies and beside a defensive tower. It stands at the highest point of the interior plain, approximately 642 metres above sea level, and was first documented in 1060. Its simple plan consists of a rectangular single nave with a continuous barrel vault and a semicircular apse, the rounded end of the church, covered by a quarter-sphere vault.
The church is unusually tall, reaching about twice the normal height, because it was constructed as a fortified building. Its upper defensive level contains loopholes, narrow openings through which defenders could observe or use weapons while remaining protected. Three windows pierce the west and south walls and the apse. Each has a round arch and splayed opening. The entrance is in the south wall, which also carries a two-opening wall belfry.
The apse is almost integrated into the defensive wall and retains Lombard-style blind arcades and vertical wall bands on its lower exterior. Lombard Romanesque is a regional form of Romanesque architecture associated with these exterior arcades and bands. Part of the barrel vault, the rounded apse, and the remains of a round-headed window survive. The apse follows eleventh-century Lombard Romanesque design, while the nave’s masonry suggests construction around the transition between the eleventh and twelfth centuries. The walls may have been raised during a twelfth-century enlargement.
In 1985, the rectangular building between the chapel and the semicircular tower was demolished because it was in a ruinous condition. A carved eleventh-century image of the Virgin was later offered to the reconstructed hermitage by the collector Jesús Prujà. Found in the loft of a farmhouse near Olot, where it had served as a support in the roof framework, the image was accepted for the sanctuary and given the dedication Mother of God of Ecology. Within the former castle perimeter, a park contains numerous icons evoking ecological values, climbing, and mountaineering.

