Esmeralda Bay (1989)

spanishcastlemoviemagic.com

Another Jess (or Jesús) Franco film, this time starring Fernando Rey, George Kennedy and Ramon Estevez (son of Martin and brother of Charlie Sheen, although here he is credited as Ramon Sheen).

Tales of Central American revolution filmed in Barcelona at the town of Sitges, home of a film festival, which represents the capital, with three long shots during the film in which its emblematic church looming over the beach is clearly visible.

The attack on the castle was filmed at Castelldefels, just south of Sitges. My thanks to Andreu Salillas for identifying it.