The vagaries of geography meant that the town of Hostalric was located at the foot of the so-called Camí Ral and in the middle of a network of medieval Catalan roads, which made the town a privileged and strategic place.
It seems that the name “Hostalric” can be traced back to a hostel that already existed in the 11th century, although the earliest mention of the town’s name dates from 1106 and the earliest reference to the castle is from 1145.
In 1242 James I the Conqueror granted a licence to the Viscount of Cabrera to hold a weekly market in the town. One year later, the town obtained a letter of settlement aimed at encouraging the creation of a stable population centre around the castle.
Bernat I of Cabrera ordered the building of the town’s first walled enclosure and, together with his descendants, was responsible for turning Hostalric into the administrative capital of the viscounty’s extensive lands.
The feudal struggles echoed in the town of Hostalric and in 1462 the War of the Remences left its mark when the inhabitants of the town resisted opening the doors to the troops of the Generalitat, who cut down vineyards and fields of wheat threatened to enter the walled compound.
It was consequently decided to modernise the town’s fortifications and the first field fortifications were completed during the Reapers’ War. Earth ramparts and brushwood defences were installed to protect the castle and medieval walls.
The War of the Spanish Succession triggered the building of permanent fortifications designed to make Hostalric Castle – Fortress a key defence element of the troops of Archduke Charles of Austria in Catalonia.
Hostalric played a key role during the Peninsular War, facilitating the entry of food during the siege of Girona and obstructing the passage of enemy troops. This explains why the French wanted to take the town.
The town was sacked and set ablaze on 7 November 1809 by an army of 4,000 men. The French razed the entire town to the ground and its inhabitants were forced to flee to neighbouring towns. In January 1810 the French took the town and the long siege of the castle began. Four months and over 4,000 bombs later, Colonel Estrada and the surviving members of the garrison tried to save themselves by fleeing the fortress and fighting their way through the enemy. The fortress was taken by the French the next day.
The Captain General of Catalonia awarded a gold medal to the garrison officers and a silver one to the troops. The inscription read: “Constant bravery and loyalty, Hostalric 12 May 1810”.
Other important events that occurred in the 19th century were the expropriation of the Convent of the Minims in 1835 as a result of the ecclesiastical confiscations of Mendizábal, the arrival of the Carmelite Sisters of Charity, who took over the running of the old hospital and a girls’ school in 1856, the arrival of the steam train in 1860, the literary festival in honour of Frederic Soler Pitarra in 1887, the installation of electricity in 1895 and the construction of the Llensa cork factory.
The parish church was burned down at the start of the Spanish Civil War but the town was not bombed. During this time, the castle was used as a fuel and ammunition store for the Republicans, and after the war as a shelter and home for many passers-by.
In June 1939, the City Council ordered to change all the signs written in Catalan.
Joan Guitart i Roca, called “Sanxo”, was mayor from 1937 to 1939, when he was called up. In July of the same year he was shot by Francoists in Girona.
In 1949 the Spanish government sold the abandoned castle to Hostalric Town Council for 18,500 pesetas.
Restoration works began in 1967 in order to turn it into a restaurant.
In 1963, Hostalric was declared a National Heritage Site and from then on, the slow but continuous recovery, conservation and exposure of its architectural heritage began.