In the 10th century there was an early building in the place today occupied by the Abbot’s Palace, probably a hospital for poor people and pilgrims. Two hundred years later, the hospital was moved to the other side of Octavià Square, in the street bearing its name.
Using the remains of the previous building, Octavià Castle was built in the 13th century, and enlarged in the fourteenth. Rather than a military fortress, it has always been an element of prestige, the symbol of the monks’ feudal lordship. Different Kings of Aragon stayed here for some time, so that it fulfilled the same function as the royal palace of Poblet or of Santes Creus. In 1343 King Jaume III of Majorca was imprisoned here after having been defeated by King Pere III the Ceremonious.
To comply with King Philip V’s order to destroy the fortifications, in 1716 the monks decided to open windows and balconies on the façades so that it lost its military appearance and looked like a palace, the abbot’s. Roofs were built upon the merlons and the spaces between them were bricked up or transformed into windows. Interior ceilings were raised and higher and more seigniorial doors placed. Abbot Llupià had the Gothic courtyard built and the staircase covered, and his coat of arms set upon the new entrance. In 1844 it became the parish house, a function that continues today.