The old castle of Montpalau, also known as “Palau d'Amunt” was built during the second half of the 11th century. It is located at the top of a hill on the right side of the river Fluvià, from where it overlooks Castellfollit valley, Montagut and Argelaguer. When Arnau de Sales died in 1216, his widow, Alamanda de Sales, donated the castle to Dolça de Montpalau. In 1221 Alamanda de Sales reformed the chapel dedicated to Santa Magdalena. Apparently, this chapel had been an idea of her deceased husband. When Alamanda de Sales died, the castle was transferred to her daughter Guilleuma, married to Arnau de Soler. Finally, in the 15th century, the lords of Montpalau decided to leave the castle and build a new one, more suitable for their social status, next to Santa Maria d'Argelaguer church. Apart from 15 metres of a wall and some remains of the east façade, there is nothing else left. According to the historians, Santa Magdalena de Montpalau chapel is the first documented building dedicated to Santa Magdalena.