the building was thought of as defense against pirates and foreign powers