The Castle of Leiria crowns the rocky hill above the old town, visible from almost anywhere in the city. Originally a Moorish fortress, it was captured by Afonso Henriques in the twelfth century and turned into a southern bulwark of the young Portuguese kingdom. The current ensemble — royal palace, keep, and ruined church of Nossa Senhora da Pena — is largely the work of King Dinis in the early 1300s.
The climb up through narrow lanes takes about fifteen minutes from the cathedral. Inside the walls you can wander the parade ground, climb the keep for views across the Lis river valley to the pine forests of Pinhal de Leiria, and explore the elegant ruined chapel. Allow at least an hour.