Around 1512, King Ferdinand the Catholic decided to erect a castle on the top of a hill near the ford of Behobia to prevent French troops from crossing the Bidasoa river. It appears to have been completed by 1518 when it was handed over to Hernán Pérez de Yarza (1518-1521).
In 1521, during the War of the Communities Gazteluzar was taken by Admiral Bonnivet's troops and subsequently regained. The fierce fighting caused heavy damage to the castle and given that it was considered to be of only debatable strategic value, in 1539 Charles V ordered that it be demolished (although the work was not actually undertaken until 1542). Most of the ashlar stonework was used to strengthen the walls of Hondarribia. The ruins of the castle were used subsequently used as a dwelling place and for fortification.
The most outstanding feature of the fortification - designed by Diego de Vera - is the triangular floor plan, formed by three curtains 22 metres in length and 5 metres thick made of limestone masonry (small unworked stones) cemented with lime and covered in ashlar (dressed stone). At the angles, there were circular turrets with an external diameter of 21 metres.
At the bottom of the curtains there were three loopholes (apertures through which defenders could shoot) with another two at a height of about 6 metres, on the level of the second storey. Each of the turrets had a further three loopholes. Access to the castle was by means of a gate in the southern curtain.
Two of these curtain walls (NW and S) are still intact to a height of about nine metres. The eastern curtain has been practically razed to the ground. The base of one of the turrets (SE) also remains, as do sections of the other two.