The cloister and chapel of an Hieronymite monastery from the 16th century occupies part of the complex. Ferdinand integrated them into the palace, so preventing further deterioration.
The photo shows a Manueline window from the 16th century.