This Moorish castle was given to the Knights Templar after being conquered by the monarchs of Aragon at the end of the 11th century, and it became one of their most powerful lands.
The old Moorish fortress was handed over to the Knights Templar in 1143. Their soldier-monks turned it into a convent, with military Cistercian buildings. The future King of Aragon, James I "the Conqueror", received his primary education here. It consists of a more modern walled enclosure (17th-18th centuries) surrounding the five 12th century Templar constructions. The Keep is an old Moorish tower (10th century) fitted out as the residence of the commander. The Romanesque chapel is situated next to it. The chapter house-refectory is a rectangular building, 35x12 metres, wide and bare, with a cistern. The bedrooms are situated in a two-storey building with a cellar, and the Jaime I Tower, with a trapezoidal floor plan, two stories and terraces, was used as the prison for those lands.