The Castle was founded by Gualdim Pais, under the reign of D. Afonso Henriques (in 1160), and still retains some of the features of this period. In 1357, forty five years after the end of the Order of the Knights Templar, the castle became the headquarters of the Order of Christ.