The seat of Santiago Order
After an Almoadan assault in 1191 the Santiago Order left the castle in ruins only returning on 1205 when the castle was rebuilt by King Sancho I, from 1210 te Order made Palmela as seat of the Order.
Later, King D. Jo?o I ordered restoration to the castle, principally to the keep and tower. In 1423, the same king built a monastery which, from 1443 became the definitive seat of the Knights of the Order of Santiago. In 1689, King D. Pedro II had the walls fortified with buttresses and cover, thus preparing the old castle to be fit out with modern defensive machinery (cannons).
The earthquake of 1755 damaged the castle where, inspite of this, the Knights of the Order of Santiago remained until 1834 when all religious Orders of this kind became extinct in Portugal.


I'm sure you're wondering where the heck it is...