Constructed around the 12th-13th century it was dedicated mainly to surveillance, shelter and defence of the population. However, the current remains seem to date back to the 14th century, due to the work of the Castilians, being up to three times smaller than the original Arabic structure. This is evidenced by the existence of embrasures designed for cannons and culverins. The current building would have been built on the original foundation and using the materials of a pre-existing Arabic castle. It was built especially for guarding the roads that linked Granada with the coast, alongside the fortified castle in Vélez de Benaudalla. It is said that an autonomous mayor resided in the castle and relied on a small garrison. It was the scene during the first Moorish rebellion, in the 1500s during a personal attack by King Ferdinand the Catholic, where it is said that the Moorish ruler of Lanjarón threw himself from the castle tower, rather than surrender.