Since the first settlers arrived around the 8th century BC, Rapallo, Italy has been plagued by battles with the Lombards, Aragonese, Ottomans, French and Germans. Castello sul Mare was built in the mid-16th century to defend against the Barbary pirates who looted the town and kidnapped young women. Since then, Castle on the Sea has been used by the Captaincy of Rapallo, a prison, the Palace of Justice, and now a major art exhibition. Attached to the castle is the St. Cajetan chapel. It was built in 1688.