The oldest structures of Sant Joan Castle in Blanes date back to the 11th and 12th centuries, and it was established during this period to ensure effective control of the territory and provide protection against maritime raids by pirates. It was attacked by Felip III of France, known as Felip l’Ardit, in 1285 and by Genoese troops in 1332. These conflicts caused extensive damage to both the fortress and the town, prompting major renovations during the second half of the 14th century. Between the 16th and 18th centuries, the castle entered a period of decline and abandonment that lasted until the current restoration work began in the mid-20th century.