Placed at the foothills of the castle hillock, the church of Santa Maria was first mentioned in 1217. There are no remains of the original temple, which was enlarged at the end of the 14th and the middle of the 15th centuries. The present building, which retains a gothic air, was built between the end of the 16th century and the first quarter of the 17th century. It consists on one nave and polygonal chancel, chapels between buttresses and groin vault. On the outside, the standing features are the renaissance and baroque decoration of the facade and the bell tower, with square floor-plan, constructed around 1620 by Master Bernat N. de Mataró. The church was plundered and burned down in 1809, during the Independence War and in 1936, at the beginning of the Spanish Civil War.
The castle is built on a basalt hill and records of it date back to the twelfth century. Its importance grew because of its strategic position, controlling the Royal Way (Cami Ral) between Barcelona and Girona, and the fact that Hostalric became the administrative capital of the viscountcy of Cabrera. It was the scene of numerous battles in mediaeval times and the old castle virtually disappeared as a result. The original design for the modern fortress was the work of Francisco de Santa Cruz, a military engineer in the service of the Archduke Charles. Work on the construction of the fortress we see today was completed between 1794 and 1795 and it became an important point of resistance against Napoleon's army during the Peninsular War (1810-1814). In 1929 the castle's garrison was transferred and Hostalric ceased to be of military significance. In 1963 the castle and the town's walls and towers were declared a Cultural Site of National Interest.