At the top of Baena the towers of the ancient Moorish Castle still stand, and the fortress is believed to date back to the 9th century.
It was later used as a residential palace, and remains of the walled enclosure of la Almedina, punctuated by gates such as Arco Oscuro, Arco de Consolación or Arco de Santa Barbara, rise in the middle of small squares and crooked streets, wherein certain houses boast coats of arms that denote the nobility of their origin.
The Castle originally had a total of two gates and seven towers, four of which are called “de los Habitantes”, and the other three “las Arqueras”, “los Cabales” and “Secreto.”