Complex sentence: In the centre of the town the houses are built close to each other, which was once the means of protection from the Neretva pirates.
Split into simpler sentences: In the centre of the town the houses are built close to each other. This once was a means of protection from the Neretva pirates.