Dom Afonso Henriques, the first King of Portugal, reconquered
the Moorish castle for the Christians in 1135 that is set on the hilltop where Leiria now
stands. This is around 6 km from an older settlement founded by the Romans called Colippo. The Castle was, however, recaptured
by the Moors in 1190. Two years later King Dom Sancho I finally retook it and rebuilt the walls.
During Dom Dinis's reign (13th-14th centuries), Leiria rose in
importance as the king and his wife Queen Santa Isabel chose it as one of the royal residences, building the Royal Palace
within the castle walls. King Dom Joao I later ordered it to be rebuilt in the Gothic style, which is the centerpiece of the
castle.