The castle is on a 600 m high hill and comprises defensive walls around a plateau with two portals on the west and east side, both of them with tower of look-out.
In recent excavations Iberian walls have found from 8th century BC, that indicate a stable settlement of the territory, however, the first documentation of the castle are from 999.
Originally, it belonged to the count of Barcelona and controlled by the Gallifa family which name they adopted from the castle. They are documented from 1060 with Ramon, son of Adaltrudis, and married with Rodlendis. He was followed by his son Bernat Ramon de Gallifa, who was also a Castilian of the castle of Clarà, in Moia. Bernat Ramon death about 1115 and the castle was shared inherited by his son Ramon Bernat, entitled also Castilian of Maçanet, and his daughter Rodlendis, married with Guillem Humbert de Rocafort. On 1348 the lord of the castle was Bernardo de Guasius de Petra. Between 1357 and 1564 it was occupied for the Centelles family, by the time that people from Gallifa bought their freedom to the king Philip II of Spain for the amount of 10.000 sous’’The castle lost its character of fortress by the 16th century to become only the center of the parish of Santa Maria of the Castle.
Santa Maria del Castell
The Romanesque church of Santa Maria del Castell (Saint Mary of the castle) from the 11th century, is build at higher point of the plain inside the castle and is documented from 1060. It is single nave plant with apse and with an upper fortified floor with embrasure build by the 14th century as a last resort of the resistance of the inhabitants of the castle. Until 1860 it was parish of a part of the term, sharing this function with the church of Gallifa. The original image of Saint Mary of the castle (19th century), was spoiled during the Spanish civil war (1936-1939).
Ecological Sanctuary of Gallifa
On 1985, the priest of Gallifa, Josep Dalmau, started the reconstruction of the Romanesque hermitage. As the hermitage had no image, the collector Jesús Prujà offered an image of a Virgin from the 11th century, which he had found in the loft of a farmhouse near Olot, acting as buttress on the framework of the roof. From this image neither the name nor the origin are known. The priest Dalmau accepted it, renaming it with the dedication of the Mother of God of the Ecology. Once the church was restored, the place was converted into a space of encounter and defense of the ecological values from a Christian perspective. In the inland of the perimeter of the ancient castle there is a park with several icons of the values of the ecology and the climbing.