 In 1723 underwent a renovation by order of Alonso Pérez de Saavedra y Narváez, Count of la Jarosa, being mayor of the city, and in 1795 was rebuilt by the Sevillan architect José Chamorro, eliminating the Almohad appearance and bestowing the classicist air which currently has.In 1836, during the invasion of Andalusia by the Carlist forces, was made a moat with drawbridge in order to strengthen the set.Possibly suffered damage during the conflict, and once completed was renovated, and it removed an altarpiece dedicated to Virgin of Sorrows that guarded inside, all prior to 1849, and was one of the gates that by then not closed at night.