 Later, under the reign of King Manuel I, the town and its castle are figured by Duarte de Armas (Book of Fortresses, c. 1509).At that time the castle was remodeled structure giving way to the Palace of the Dukes of Braganza and a barbican (1510), getting the works in charge of the architect-royal Francisco de Arruda, for instance D. Jaime, Duke of Braganza.Lost its defensive function, away from border and the main access roads to the Alentejo region, the castle was gradually abandoned until becoming ruins in the nineteenth century.