The castle was built by Viscount Rocabertí in the 14th century outside the walled enclosure, beside the Carmelite Covent. In 1923 it was acquired by Miguel Mateu Pla to house his large collections of sculptures, altarpieces, tapestry, furniture, etc. He expanded the convent library, which currently has around 70,000 volumes, with illuminated codices and Gothic manuscripts, among other works. The castle currently has an important wine cellar, with a tradition dating from the 15th century. During the month of August it plays host to an important international music festival.