Just northwest of the Igreja de São João is the 17th-century facade of a much older palace and castle, as revealed by the two powerful square towers that bracket it. The Palácio dos Duques de Cadaval was given to Martim Afonso de Melo, the governor of Évora, by Dom João I, and it also served from time to time as a royal residence. A section of the palace is still in use as the private quarters of the de Melo family; the other main occupant is the city’s highway department.