The Gothic Church of Nostra Senyora de la Esperanca stands at the top of Capdepera Castle. This lovely building has no aisle and steps behind the bell tower lead to a flat roof with superb views over the village. According to legend, when the village was under siege, its inhabitants hid in the castle and placed an image of Our Lady of Hope on the battlements. Fog came down and drove the invaders away. This event is remembered at a yearly festival.