Built at the end of the 13th century at the request of King D. Dinis, on an existing defensive structure, which would have started with a prehistoric fortress and later by Roman buildings, Visigoth and Arab, it is part of the chain of fortifications that bordered with Spain.
At the time of the Christian Reconquest of the Iberian Peninsula, in the reign of D. Afonso Henriques, this castle was conquered but would fall back into the hands of the Muslims, only before the reign of D. Sancho II, in 1232, to pass definitively to the Portuguese possession.
participated, in this reconquest, the Knights of the Order of the Temple, to whom D. Sancho II donated the castle and its domains. With the extinction of this Order, the castle passed to the Order of Christ and already in the reign of D. Dinis, the Torre de Menagem was built, which still dominates the landscape today.
During the Restoration War, the castle was adapted to the new realities of the war, with the creation of supports for artillery.
Today, it is classified as a National Monument, It is a privileged viewpoint over the Alqueva dam.